Common questions and troubleshooting:
- Troubleshoot: The search box in my theme is not opening the overlay
- Troubleshoot: Some of my content is missing from search results
- Troubleshoot: My custom taxonomy is never being displayed
- Troubleshoot: Searches are not matching against content in post meta
- Troubleshoot: How do I search against multilingual content with the WPML or Polylang plugins?
- Customize Results: How do I only show results from certain post types (e.g. products)?
- Customize Results: How do I remove all posts/pages with a certain category?
- Pricing: How can I reduce the number of records on my site?
- Pricing: Will search stop working if I go beyond my maximum number of records?
- Pricing: I have the Jetpack Professional Plan, how is this different?
- Other questions
FAQs
The search box in my theme is not opening the overlay
Some themes do not use the standard get_search_form() function to render their search box. First verify that search is working correctly on your site by adding a search query to the end of your site URL. For instance if your site is mysite.com
then navigate to mysite.com?s=searchterm
.
If that works, then there are a few options:
- Contact the author of your theme and ask them to add support for Jetpack Search. We try to attach to search boxes in a number of different ways.
- Add a search box to your theme yourself.
- Add a button to your site that will open the search overlay.
Some of my content is missing from search results
When Jetpack is first connected it can sometimes take hours or days to fully sync all data depending on how many records you have. If the number of results when you have not done a search is still going up every few minutes then it is likely that data is still being synchronized. When you first purchase Search we also need to build your search index and that can also take a while, though it is much faster than doing a full sync.
There are some common problems that sites do have though:
- Custom post types can be publicly available but be set to not be searchable. This happens when
exclude_from_search
is set totrue
when registering the post type. - Content directly imported into the database. If you are regularly importing content and not triggering the WordPress hooks then Jetpack will not synchronize the data. A good hook to use is publish_post.
- Using
post_status
other thanpublish
. We only index and search against posts that have thepost_status
of eitherpublish
orclosed
(for bbpress).
If you change any of the above you will need to do a full sync of your site. To do so:
- Log in to wordpress.com
- Under “My Sites” navigate to Manage > Settings > General > Site Tools > Manage your connection
- Under “Data synchronization” click on “initiate a sync manually”.
My custom taxonomy is never being displayed
If you have configured a custom taxonomy in your sidebar widget, but it is never being shown it is possible that your taxonomy is not yet supported. We have a fixed list of custom taxonomies that we index (a bit more than 1,000 of them). We can add to this list fairly easily, but we prefer to only do so with generic words and names. If your custom taxonomy is a generic name and not showing up for searches then please contact support and we should be able to add it.
We are still working on improving the process for adding new taxonomies and post meta fields.
Searches are not matching against content in post meta
We have a list of post meta keys that we match against. We are still working on improving the process for adding new taxonomies and post meta fields.
How do I search against multilingual content with the WPML or Polylang plugins?
We do not currently support multiple languages on the same site. We hope to add support soon: https://github.com/Automattic/jetpack/issues/8766
How do I only show results from certain post types (e.g. products)
This code filter will filter all search queries so that only results from products and pages are shown. This does not impact the number of records that are indexed though (see below).
function jp_filter_query( $options ) { $options['adminQueryFilter'] = array( 'bool' => array( 'should' => array( array( 'term' => array( 'post_type' => product' ) ), array( 'term' => array( 'post_type' => page ) ), ) ) ); return $options; } add_filter( 'jetpack_instant_search_options', 'jp_filter_query' );
How do I remove all posts/pages with a certain category
This filter will remove all posts/pages with the “removeme” category from search results. See the developer documentation for other fields available.
function jp_filter_query( $options ) { $options['adminQueryFilter'] = array( 'bool' => array( 'must_not' => array( array( 'term' => array( category.slug' => 'removeme' ) ), ) ) ); return $options; } add_filter( 'jetpack_instant_search_options', 'jp_filter_query' );
Other Questions
If you have questions or concerns, we would love to hear from you! Feel free to contact us.