Continue reading WP Download Manager

WP Download Manager

WP Download Manager is a popular file management plugin for WordPress. It’s unfortunately incompatible with Relevanssi attachment content reading out of the box, as Relevanssi expects the attachments to be stored in the Media Library, and WP Download Manager stores the files outside Media Library. Fortunately Relevanssi includes the necessary filter hooks that make it…

Read more WP Download Manager 0 Comment on WP Download Manager
Continue reading WooCommerce: Return only exact matches for SKU searches

WooCommerce: Return only exact matches for SKU searches

This little filter function works on relevanssi_hits_filter. When a search query is made that matches a SKU (or any other custom field, but SKUs are the most likely scenario here), only results that match the SKU will be returned. In order for this to work, Relevanssi must be set to index the _sku custom field…

Read more WooCommerce: Return only exact matches for SKU searches 1 Comment on WooCommerce: Return only exact matches for SKU searches
Continue reading Wishlist Member: Sorting the posts by membership levels

Wishlist Member: Sorting the posts by membership levels

Someone wanted a way to prioritize posts that are targeting particular Wishlist Member membership level. The basic implementation here is simple: create a relevanssi_hits_filter function that will sort the posts by the level. There’s a trick to this, though, as Wishlist Member does not provide a way to check the level of one post. There’s…

Read more Wishlist Member: Sorting the posts by membership levels 0 Comment on Wishlist Member: Sorting the posts by membership levels
Continue reading Events Calendar: Remove past events from search

Events Calendar: Remove past events from search

If you have events on your site, you might not want to show the past events in the search. This is easy to do with Relevanssi. It can be done in two ways: either you block the past events in indexing or in searching. In most cases, the best solution is to do both. Blocking…

Read more Events Calendar: Remove past events from search 2 Comments on Events Calendar: Remove past events from search
Continue reading Chamber Dashboard Business Directory

Chamber Dashboard Business Directory

The Chamber Dashboard Business Directory plugin has a business directory search that’s not compatible with Relevanssi. To disable Relevanssi in those searches, add this to your theme functions.php: add_filter( ‘relevanssi_prevent_default_request’, ‘rlv_allow_chamber_search’, 10, 2 ); function rlv_allow_chamber_search( $prevent, $query ) { if ( isset( $_GET[’searchtext’] ) ) { $prevent = false; } return $prevent; }add_filter( ‘relevanssi_prevent_default_request’,…

Read more Chamber Dashboard Business Directory 0 Comment on Chamber Dashboard Business Directory