Archived topic
Search results not showing post title
10 replies · Started by Brian on October 27, 2020
Hi
I'm not sure what happened here or when the change was made, but my search results are not displaying the post title. The featured image is there but nothing else. I have it set to just show the image followed by the title, any idea how I can fix this?
Thanks
Brian
Hi there,
do you have any custom functions that you're using to change the display of post archives ?
To Remove Archive Description Paginated
add_filter( 'generate_header_element_display', function( $display ) {
if ( is_paged() ) {
$display = false;
}
return $display;
} );
add_action( 'wp', 'tu_remove_paged_category_description' );
function tu_remove_paged_category_description() {
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
if ( 1 !== $page ) {
remove_action( 'generate_archive_title', 'generate_archive_title' );
add_action( 'generate_archive_title', 'tu_custom_paged_archive_title' );
}
}
function tu_custom_paged_archive_title() {
?>
<header class="page-header">
<h1 class="page-title">
<?php the_archive_title(); ?>
</h1>
</header>
<?php
}
and possibly this
add_shortcode( 'term_description', 'tu_term_description' );
function tu_term_description() {
ob_start();
echo term_description( get_queried_object()->term_id, 'category' );
return ob_get_clean();
}
I don't think those functions would cause this issue.
Can you temporarily remove them to test?
HI Leo/David
I deactivated all of my snippets and that didn't help.
Could it be a plugin conflict?
Do you have a layout element created that is disabling the content title by chance?
Hi Leo
Yes! I have a layout for pages and archives and for some reason I had clicked to disable the title. I'm not sure why I did that, but I changed it and all is well now.
With Generatepress there are so many possible edits I need to use the notes section better so I don't forget why I implemented each one :-)
Thanks for the help!
Glad to hear :)
@Leo, I'm having this same issue. My search results and category pages are not showing the post titles. Only get the featured image and an excerpt.
I cannot find a way to turn them back on and I don't believe I have any custom css that would interfere.
Site: Physician on FIRE

Hi @Leif,
As this topic is resolved for the topic starter, can you open a new topic? So you could use the Private information text field if we have to ask for site details. :)
We'll make sure to address your concern on it.