Continue reading Issues with post order plugins

Issues with post order plugins

…then you may be using a plugin that affects the post order. One example is Intuitive Custom Post Order, which reorders posts – and the Relevanssi results. The fix is simple, though. Add this function to your site: add_filter( ‘relevanssi_orderby’, function ( $orderby ) { return array( ‘relevance‘ => ‘desc’ );…If you’re getting low-quality results and the weight settings are not affecting the results, the first thing to check is to see if your results are coming from Relevanssi in the first place. That’s easy to check: disable Relevanssi and see if the results change. If the results change, they’re……coming from Relevanssi. If the results don’t change, see this debugging info. If Relevanssi is powering the search and the results still won’t change when you change the weights (change the weights a lot – for example, if you want to adjust the title weights, set the title weight to 1000),…

Read more Issues with post order plugins 0 Comment on Issues with post order plugins
Continue reading Yoast Local SEO

Yoast Local SEO

Yoast Local SEO plugin breaks Relevanssi search. It enhances the search by adding meta queries. Unfortunately they don’t work with Relevanssi. The fix is simple, though. Add this to the theme functions.php: add_filter( ‘relevanssi_modify_wp_query‘, ‘rlv_meta_fix’, 99 ); function rlv_meta_fix( $q ) { $q->set( ‘meta_query’, array() ); return $q; } This…

Read more Yoast Local SEO 14 Comments on Yoast Local SEO
Continue reading WooCommerce: Popularity and price sorting

WooCommerce: Popularity and price sorting

…as easily as the default WP search does. This function handles price, popularity and rating sorting: add_filter( ‘relevanssi_orderby’, ‘woocommerce_relevanssi_orderby’ ); function woocommerce_relevanssi_orderby( $orderby ) { if ( in_array( $orderby, array( ‘price‘, ‘price-desc’ ), true ) ) { global $wp_query; $orderby = ‘meta_value_num’; $wp_query->query_vars[‘meta_key’] = ‘_price’; } if ( ‘price‘ ===…Many WooCommerce users use search sorting that allows users to sort by popularity or price. Unfortunately, while Relevanssi works fine with WooCommerce, those sorts do not work. Relevanssi doesn’t know about price or popularity, and the sorting assumes there’s a default WP search underneath. Relevanssi doesn’t do meta field sorting…

Read more WooCommerce: Popularity and price sorting 39 Comments on WooCommerce: Popularity and price sorting
Continue reading bbPress: Indexing topics and replies

bbPress: Indexing topics and replies

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,…

Read more bbPress: Indexing topics and replies 6 Comments on bbPress: Indexing topics and replies
Continue reading Co-authors Plus

Co-authors Plus

Co-Authors Plus is a neat plugin that makes it possible to have multiple authors for one post in WordPress. This is a useful feature WordPress doesn’t yet support. Relevanssi only picks up the first author from the post, but making Relevanssi find the other authors as well is very simple,……thanks to good design choices made by the Co-authors Plus developers. The plugin stores the extra authors in a custom taxonomy. Indexing custom taxonomies is elementary for Relevanssi. In order to make Relevanssi index all authors for posts, simply add “author” to the “Choose taxonomies to index” option and re-index….

Read more Co-authors Plus 29 Comments on Co-authors Plus
Continue reading WP e-Commerce

WP e-Commerce

WP e-Commerce is a popular shopping cart plugin for WordPress. This code by Alexander Gieg, added to functions.php for example, makes Relevanssi work better with WP e-Commerce. add_filter( ‘relevanssi_excerpt_content’, ‘wpsc_product_excerpt’, 10, 3 ); function wpsc_product_excerpt( $content, $post, $query ) { if ( ‘wpsc-product’ === relevanssi_get_post_type( $post->ID ) ) { $content…

Read more WP e-Commerce 14 Comments on WP e-Commerce