Archived topic
Search result query text and FacetWP
3 replies · Started by Steven on January 21, 2021
When FacetWP is enabled, the search results page doesn't include the search terms after the text "Search Results for:". When FacetWP is disabled, the search terms are shown as expected after that text. We reached out to FacetWP support and they asked if we're calling the search terms value by using
<?php echo get_search_query(); ?>
The GP code appears a bit different, but seems to be similar:
<?php
printf(
/* translators: 1: Search query name */
__( 'Search Results for: %s', 'generatepress' ),
'<span>' . get_search_query() . '</span>'
);
?>
Any idea what may be conflicting here?
Hi,
Can you test if the same issue occurs when you're using default WordPress themes? (twenty twenty, twenty twenty-one, etc).
We can't really be sure as we don't see the codes behind how FacetWP renders its search result page.
And it's a third party plugin so it's pretty much out of our scope of support.
Thanks for the reply, Elvin. We should have checked the default theme but must have overlooked that when trying all the different combos of disabling plugins, etc. We'll continue to follow up with FacetWP support.
No problem. :D