Customizing content-archive, to remove title on pages, keep on posts
-
I need to remove the page title from archive search results. I understand how strange that sounds (I really do!), but it’s key to my site’s design.
This is what the content-archive looks like…
// Header ob_start(); get_template_part( 'partials/entry', 'meta-top' ); get_template_part( 'partials/entry', 'sticky' ); if ( 'post-header' === $thumb_option ) : get_template_part( 'partials/entry', 'thumbnail' ); endif; get_template_part( 'partials/entry', 'title' ); get_template_part( 'partials/entry', 'meta-before-content' ); $entry_header = trim( ob_get_clean() );
When I remove
get_template_part( 'partials/entry', 'title' );
it removes the page title perfectly.Unfortunately, doing that also removes the title on blog posts (Post Type: ‘post’). I need the title to remain on that post type.
Is there a way to indicate only remove titles on (Post Type: ‘page’) here?
get_template_part( 'partials/entry', 'title' );
Thanks in advance!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Customizing content-archive, to remove title on pages, keep on posts’ is closed to new replies.