Snippets: Display Post Tile For Custom Post Type Post in Page Title Instead of Post Type Name

By default your custom post types display the post type in the main page header/title because the post title is displayed on the post itself so this prevents duplicate title issues. If you want to display the post title in the main page header/title do so with the following snippet added to your child theme's functions.php file.

function myprefix_alter_page_header_title( $title ) {
	if ( is_singular( 'YOUR_POST_TYPE_NAME' ) ) {
		return get_the_title();
	return $title;
add_filter( 'wpex_title', 'myprefix_alter_page_header_title', 40 );

Snippet Type: PHP

All PHP snippets should be added via a child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)