Listings do not appear in Website Search with Atsra theme

Hello,

I am having a problem with the listings on my website not appearing in the site’s main search.

Notes:

  • Platform: Wordpress . com
  • Theme: Astra

Links:

DETAILS

If I try to search with the website’s MAIN search engine (e.g., jetpack) the listings do not appear in the search. I just get a “No Results Found” page. The Hivepress search page is fine, but the custom posts are not appearing in the website’s general search bar.

I asked Astra and they said the issue is not on the theme’s end. I checked my theme’s customization and the Custom Posts (Listings) is selected to appear.

Thanks in advance

Hi,

Yes, we are aware of this issue and will fix it in future updates. As a workaround, we can provide a PHP snippet to enable this for Jetpack, but please note that there may be issues with the blog layout if it has a listing. Therefore, we recommend using our search.

I might try the PHP snippet. Right now, since they are not loading in the Jetpack search, they don’t appear to be indexing with Google either. If you have that snippet I would appreciate it.

Thanks!

Please try this PHP snippet to add listings to Jetpack search:

remove_filter( 'jetpack_search_should_handle_query', [ hivepress()->attribute, 'disable_jetpack_search' ] );

Please note that this may cause issues with the built-in HivePress search, e.g. Jetpack may try to take over the layout if the search is performed (both Jetpack and HivePress detect the search page by the “s” parameter in the URL, but HivePress does this for the listing post type only) and show the blog posts layout for search.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.