Products with a forward slash not found

[ad_1]

By default, Relevanssi replaces slashes with spaces, so “AC/DC” becomes “AC DC” and isn’t indexed, because the words are too short.

Add this to your site:

add_filter( 'relevanssi_punctuation_filter', 'rlv_adjust_punctuation' );
function rlv_adjust_punctuation( $replacements ) {
$replacements['/'] = '';
return $replacements;
}

Rebuild the index, and now “AC/DC” is indexed as “ACDC”.

Mikko – you’re awesome. Thanks so much!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer