Continue reading Indexing ACF relationship content

Indexing ACF relationship content

If your posts include content from related posts using the Advanced Custom Fields relationship functionality, Relevanssi doesn’t index that content by default. Even if you set Relevanssi up to index the ACF fields, the relationship fields do not include any content, just references to other posts. Those, even if indexed, are not particularly helpful. ACF…

Read more Indexing ACF relationship content 0 Comment on Indexing ACF relationship content
Continue reading Using AND and OR for Boolean operators

Using AND and OR for Boolean operators

Relevanssi Premium has support for in-query Boolean operators. Relevanssi uses + and – for the operators: cats -dogs and cats +kittens. If you prefer instead to use the verbal AND and OR operators, it only takes one small function in your theme functions.php: add_filter(’relevanssi_search_filters’, ‘rlv_boolean_operators’); function rlv_boolean_operators($args) { $args[’q’] = str_replace(’ and ‘, ‘ +’,…

Read more Using AND and OR for Boolean operators 0 Comment on Using AND and OR for Boolean operators
Continue reading Indexing ACF fields for taxonomy terms

Indexing ACF fields for taxonomy terms

Advanced Custom Fields makes it possible to add custom fields to taxonomy terms. If you set Relevanssi to index custom fields, Relevanssi won’t index these taxonomy custom fields, because taxonomy terms aren’t generally allowed to have custom fields and the default get_post_meta() function in WordPress doesn’t work on taxonomy terms. Getting the fields indexed requires…

Read more Indexing ACF fields for taxonomy terms 0 Comment on Indexing ACF fields for taxonomy terms
Continue reading SearchWP Live Ajax Search

SearchWP Live Ajax Search

Relevanssi doesn’t ship with a live search feature that would display results as the user types the search terms. There are many other plugins that provide this functionality, but few work with Relevanssi. SearchWP Live Ajax Search is the best one that does. It’s very easy to use, most of the time just install and…

Read more SearchWP Live Ajax Search 0 Comment on SearchWP Live Ajax Search
Continue reading Indexing and searching PDFs in WordPress

Indexing and searching PDFs in WordPress

Relevanssi Premium users have asked for PDF indexing since day one, and version 2.0 finally introduces this feature. Coming up with a method that is fast and reliable hasn’t been easy, but we’re pretty proud of what we have now. Our PDF indexer doesn’t tax your server as it runs as a service on a…

Read more Indexing and searching PDFs in WordPress 0 Comment on Indexing and searching PDFs in WordPress
Continue reading WP All Import compatibility

WP All Import compatibility

By default posts imported with WP All Import do not get indexed by Relevanssi. The importing process does not trigger Relevanssi indexing. That is, however, easy to remedy: add_action(’pmxi_saved_post’, ‘post_saved’, 10, 1); function post_saved($id) { relevanssi_index_doc($id, true, relevanssi_get_custom_fields(), true); }add_action(‘pmxi_saved_post’, ‘post_saved’, 10, 1); function post_saved($id) { relevanssi_index_doc($id, true, relevanssi_get_custom_fields(), true); } Add this code to…

Read more WP All Import compatibility 2 Comments on WP All Import compatibility
Continue reading Showing only one recurring event

Showing only one recurring event

Some event calendar plugins do recurring events by creating many posts. That’s fine, until those cloned posts fill up your search results. This function, added to your theme functions.php, will only show one of each post with the same title, and will take the one with the first date. The date is checked from _EventStartDate…

Read more Showing only one recurring event 2 Comments on Showing only one recurring event
Continue reading Indexing product variation SKUs for main product

Indexing product variation SKUs for main product

Relevanssi can index product and product variation SKUs for WooCommerce products: just add _sku to list of custom fields to index. However, if you want to find the main product when searching for the product variation SKU, you need some extra code. Just add this function to the theme functions.php and rebuild the index: add_filter(’relevanssi_content_to_index’,…

Read more Indexing product variation SKUs for main product 3 Comments on Indexing product variation SKUs for main product