Want to know what WordPress Theme a site is using? Check Out Now!

How to Hide TablePress Tables in WordPress Search Results?

I encountered a problem a couple of years ago, when WordPress default search functionality stopped working properly.

It happened right after the installation of a popular WordPress table plugin, TablePress. When I troubleshooter the problem, I found out that TablePress tables are causing issues when someone searches a word using native WordPress search.

So if you are facing the same problem, this piece of code may solve the problem.

 * Disable Integration of TablePress plugin with WordPress Default Search
add_filter( 'tablepress_wp_search_integration', '__return_false' );

What the above piece of code does is that TablePress tables won’t get searched when someone uses the default WordPress search and hides the TablePress tables completely in WordPress search results.

Leave a Reply

Your email address will not be published. Required fields are marked *