Disabling title or content indexing

Author: 

https://www.relevanssi.com/


Description: 

If you want to prevent the indexing of titles or post content for some reason, Relevanssi has couple of useful filters for that. The filters are called relevanssi_index_content and relevanssi_index_titles. These are simple true/false filters, so if you want to activate the filter, add a function that returns false, like this:

add_filter( ‘relevanssi_index_content’, ‘__return_false’ );
That’s all. Replace relevanssi_index_content with relevanssi_index_titles to stop titles (and please don’t stop both at the same time).

Once you’ve got the function in your functions.php file, you need to reindex the database. If you’ve stopped post content, indexing should be much faster than usual.

If you then remove the function, the effect will remain until you reindex the database (or posts are indexed when they are updated).




Kind:

PHP, plugin


URL: