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 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
Continue reading Advanced Custom Fields Relationship fields

Advanced Custom Fields Relationship fields

Update 16.1.2018: There’s a better post on this topic at Indexing ACF Relationship Content. I’m working on a website and i’m use A LOT the Relationship field au ACF. So on my pages are displayed informations of some related custom post. Is there a way to get that working in the search ? With some…

Read more Advanced Custom Fields Relationship fields 1 Comment on Advanced Custom Fields Relationship fields
Continue reading Indexing attachment filenames

Indexing attachment filenames

Relevanssi has been working nicely for the normal usecase. But how does one setup indexing of attachment files. When someone searches by filename or extension like pdf, there are no results. I have enabled ‘attachment’ at Relevanssi ‘Indexing options’ and still there are no results. Relevanssi doesn’t index attachment file names. For attachments, Relevanssi indexes…

Read more Indexing attachment filenames 0 Comment on Indexing attachment filenames
Continue reading Searching by post ID

Searching by post ID

Are post ID’s searchable in Relevanssi? No. Relevanssi does understand the WP_Query p parameter to restrict the search by post ID. However, if you want to search by post ID, it’s very simple to make that happen: add_filter(’relevanssi_content_to_index’, ‘rlv_index_post_id’, 10, 2); function rlv_index_post_id($content, $post) { $content .= " " . $post->ID; return $content; }add_filter(‘relevanssi_content_to_index’, ‘rlv_index_post_id’,…

Read more Searching by post ID 0 Comment on Searching by post ID
Continue reading How to index parent categories

How to index parent categories

Suppose you have a parent category with no products in it but a child category does. If you search by the parent category can relevanssi be set up to show the products in the child category? Cars > Wiper Blades. A search for cars shows wiper blade products. By default this does not work, because…

Read more How to index parent categories 0 Comment on How to index parent categories
Continue reading Relevanssi and BBPress

Relevanssi and BBPress

Relevanssi does work with BBPress. BBPress forums, topics and replies are regular WordPress posts. In order to get Relevanssi working with BBPress, you need to make Relevanssi index post type “topic” (forget “forum”, and I think it’s better if you skip “reply” as well). Since “topic” is non-public post type, you also need to uncheck…

Read more Relevanssi and BBPress 4 Comments on Relevanssi and BBPress
Continue reading Indexing additional content

Indexing additional content

Sometimes you may want to index additional content to your posts. Perhaps dynamic content generated by some PHP script, perhaps data from another, external database. It is quite easy, as there’s a simple filter you can use. When Relevanssi indexes a post, it calls relevanssi_content_to_index to see if there’s additional content to index. This filter…

Read more Indexing additional content 8 Comments on Indexing additional content