Using Relevanssi in the admin TRASH product search

[ad_1]

Hi there,

Since trashed posts by default are not indexed, this snippet destroys product search in the trashed page. I prefer not to index trashed posts, but instead not activate Relevanssi on the trashed products screen. Maybe you should add a note about that at the snippet page.

I changed line 3 to:

if (isset($query->query_vars['product_search']) && $query->query_vars['post_status'] != "trash") $ok = true;

The page I need help with: [log in to see the link]

 

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