Continue reading Free 3.1.8

Free 3.1.8

Version 3.1.8 is a bug fix release, and well recommended if you use WPML, BBPress or category exclusions or restrictions. Category restriction and exclusion and couple of other category-related settings didn’t work properly. Support for Polylang broke the support for WPML. That is now fixed. One deprecated $wpdb->escape() was still left; it’s gone now. Shortcode…

Read more Free 3.1.8 1 Comment on Free 3.1.8
Continue reading Free 3.1.7

Free 3.1.7

Version 3.1.7 includes lots of new features and bug fixes. New filter: relevanssi_comment_content_to_index lets you modify comment content before it’s indexed by Relevanssi (to index comment meta, for example). Facetious support: if post_type is set to -1, Relevanssi will not hang up on it. Numerical search terms work better now. Excerpt-building had issues, which are…

Read more Free 3.1.7 0 Comment on Free 3.1.7
Continue reading How to include specific posts

How to include specific posts

…great solution if you have a fairly small and stable number of posts you want to include. add_filter( ‘relevanssi_indexing_restriction’, ‘rlv_index_only_some_posts’ ); function rlv_index_only_some_posts( $restriction ) { $posts_to_include = implode( ‘,’, array( 1, 2, 3 ) ); $restriction[‘mysql’] .= ” AND ( ( post.post_type = ‘post‘ AND post.ID IN ( $posts_to_include……) ) OR post.post_type != ‘post‘ ) “; $restriction[‘reason’] .= ‘ Unwanted post‘; return $restriction; } Add this to your site and list the posts you want to include in the $posts_to_include array (instead of 1, 2, 3). If you want this to target a post type other than post,……the best way depends on how many posts you want to include and how often you need to change the posts included. I’d do this by enabling posts in the site search, but then disabling indexing for all posts except those you want to include with relevanssi_indexing_restriction. This is a…

Read more How to include specific posts 2 Comments on How to include specific posts