Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove the page title from pages in GeneratePress
add_filter( 'the_title', 'generate_remove_page_titles', 10, 2 );
function generate_remove_page_titles( $title, $id = null )
{
global $post, $generate_content_filter_completed;
if ( $generate_content_filter_completed ) {
return $title;
}
if ( is_page() && in_the_loop() && $title == $post->post_title )
return '';
return $title;
}
add_filter( 'the_content', 'generate_content_filter_completed' );
function generate_content_filter_completed( $content )
{
global $generate_content_filter_completed;
$generate_content_filter_completed = true;
return $content;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.