Continue reading Index only short numbers

Index only short numbers

Relevanssi has a minimum word length setting that is set to three characters. Any one- or two-letter words are not indexed unless you change this setting from the Relevanssi advanced indexing settings. Sometimes it would be helpful to ignore short words but to index one- and two-digit numbers. You can do that with a bit…

Read more Index only short numbers 3 Comments on Index only short numbers
Continue reading Premium 2.20 / Free 4.18

Premium 2.20 / Free 4.18

This latest update adds new debugging tools, user interface features, and a Relevanssi exclude feature to the ACF field edit screen. There are also several minor bug fixes. 2.20.4 / 4.18.3 New feature: New filter hook relevanssi_blocked_field_types can be used to control which ACF field types are excluded from the……be deleted from the log. 2.20.0 / 4.18.0 New feature: Relevanssi now shows the MySQL max_allowed_packet size on the debug tab. New feature: Relevanssi now shows the indexing query on the debug tab. Premium. New feature: You can now edit pinning and exclusions from Quick Edit. Premium. New feature: You……of data attributes in in-document highlighting had a bug that caused problems with third-party plugins. 2.20.3 / 4.18.2 New feature: Relevanssi now has a debug mode that will help troubleshooting and support. Minor fix: Using the_permalink() caused problems with search result links. That is now fixed. Relevanssi no longer hooks…

Read more Premium 2.20 / Free 4.18 0 Comment on Premium 2.20 / Free 4.18
Continue reading ACF: Filtering custom fields by type

ACF: Filtering custom fields by type

On sites where ACF fields are used a lot, with Flexible Content and Repeater fields, it may be difficult to make Relevanssi only index the relevant ACF fields. One way to deal with problem is to set Relevanssi to index “visible” custom fields and then restrict the indexed fields by field type. Add this function…

Read more ACF: Filtering custom fields by type 0 Comment on ACF: Filtering custom fields by type
Continue reading Ajax Load More

Ajax Load More

…of the extension, you can make Ajax Load More use Relevanssi by adding this function to your site: add_filter( ‘alm_modify_query_args’, function( $args ) { $args[‘relevanssi’] = true; return $args; } ); This function enables Relevanssi in the Ajax Load More queries. Every time Ajax Load More loads more results, it…Ajax Load More is an infinite scrolling plugin for WordPress. It has a Relevanssi extension, but with the current versions of Ajax Load More (5.5.4.1 as I write this), the extension no longer does anything. The extension relies on a filter hook that does not exist in the plugin. Instead……counts as a new search for Relevanssi logs. If you don’t like that, you can make Relevanssi only log the first Ajax Load More search. If you want that, use these functions instead of the one above: add_filter( ‘alm_modify_query_args’, function( $args ) { global $rlv_is_offset_query; $args[‘relevanssi’] = true; if (…

Read more Ajax Load More 0 Comment on Ajax Load More
Continue reading WPML: Indexing synced posts

WPML: Indexing synced posts

…$post->post_type ); foreach ( $translations as $lang => $translation ) { $translation_id = absint( $translation->element_id ); if ( ! empty( $translation_id ) && $translation_id !== $post_ID ) { relevanssi_insert_edit( $translation_id ); } } } Thanks to Garrett McGilvray / Éditions CEB. There’s a similar solution for Polylang Pro synced posts….…); function index_post_in_all_languages( $post_ID, $post ) { if ( ! function_exists( ‘relevanssi_insert_edit’ ) ) { return; } $trid = apply_filters( ‘wpml_element_trid’, null, $post_ID, “post_{$post->post_type}” ); if ( ! $trid ) { return; } $translations = apply_filters( ‘wpml_get_element_translations’, null, $trid, $post->post_type ); foreach ( $translations as $lang => $translation ) {…When a post is updated, WPML updates all the translations of the post, but Relevanssi only indexes the post that was updated, not the corresponding posts in other languages. This method hooks into save_post after WPML to tell Relevanssi also to index the matching translations. add_action( ‘save_post’, ‘index_post_in_all_languages’, 110, 2…

Read more WPML: Indexing synced posts 0 Comment on WPML: Indexing synced posts
Continue reading Automatic redirects to category archives

Automatic redirects to category archives

…wp_list_pluck( $redirects, ‘url’ ); foreach ( $product_cats as $cat ) { $url = get_category_link( $cat->term_id ); if ( ! in_array( $url, $existing_redirects, true ) ) { $redirects[] = array( ‘url’ => $url, ‘query’ => $cat->name, ‘partial’ => false, ‘hits’ => 0, ); } } update_option( ‘relevanssi_redirects’, $redirects ); } );…

Read more Automatic redirects to category archives 0 Comment on Automatic redirects to category archives
Continue reading Indexing fails? Check max_allowed_packet!

Indexing fails? Check max_allowed_packet!

Sometimes Relevanssi can get stuck in the indexing. Relevanssi goes past the number of posts in the database and keeps indexing the posts. One possible cause is a too small max_allowed_packet value for your MySQL server. This value controls how big queries your MySQL server can take. You can see the current value with one…

Read more Indexing fails? Check max_allowed_packet! 0 Comment on Indexing fails? Check max_allowed_packet!
Continue reading Jetpack Protect and Relevanssi Premium vulnerabilities

Jetpack Protect and Relevanssi Premium vulnerabilities

At the moment, Jetpack Protect claims Relevanssi Premium has several vulnerabilities. These are all false positives. I am not aware of any current vulnerabilities in Relevanssi Premium. The vulnerabilities Jetpack Protect reports are old vulnerabilities. They have applied to Relevanssi Premium, but I fixed them long ago. They appear in the report because Jetpack Protect…

Read more Jetpack Protect and Relevanssi Premium vulnerabilities 0 Comment on Jetpack Protect and Relevanssi Premium vulnerabilities
Continue reading Reading wpDataTables imported tables

Reading wpDataTables imported tables

The wpDataTables table plugin has several ways to handle tables. Some of them work with Relevanssi without problems; some don’t. You may notice that Relevanssi doesn’t index the entire table contents for wpDataTables tables (mainly imported tables). This is because the wpDataTables shortcode does not always expand to the entire table; it only features part…

Read more Reading wpDataTables imported tables 0 Comment on Reading wpDataTables imported tables
Continue reading Polylang Pro: Indexing synced posts

Polylang Pro: Indexing synced posts

Polylang Pro has a feature to sync translations between posts. The problem with this and Relevanssi is that Relevanssi does not index the changes to the synced posts. With this filter function added to your site, Relevanssi will also index the synced posts: add_action( ‘save_post’, ‘index_post_in_all_languages’ ); function index_post_in_all_languages( $post_id…

Read more Polylang Pro: Indexing synced posts 0 Comment on Polylang Pro: Indexing synced posts