Search term no longer displaying on results page
-
I’m using SearchAndFilter PRO with a custom post type created with Advanced Custom Fields. The custom results template was showing the search term until I started using Relevanssi and now the search term doesn’t show. I found the below code on your main website that works for category searches but my search does not use categories. The below code does show the number of results but not the term that was searched. Can you tell me the correct code to get the search term to display on the results page?
query_vars['cat'] ); $s = $wp_query->query_vars['s']; echo $wp_query->found_posts . " results found with ' $s'"; if ( ! empty( $cat ) ) { echo " in the '$cat' category"; } ?>
- You must be logged in to reply to this topic.