Disable – Post search field – for non-admin roles in WP dashboard

There is no straight forward documented way of removing the search box in the admin panel’s Post dashboard (wp-admin/edit.php). However, it’s still possible by extending WP_Posts_List_Table class. Additionally, it makes sense that if you remove the search box, you’d also like to disable the search capability all together (based on your requirement). In that case, … Read more

Woocommerce – Include custom user meta in order ‘filter by registered customer’ Ajax search

After getting lost with trying to understand the class-wc-ajax.php file, I completely missed a more obvious and simple solution. Here is the code I am using which works perfectly. I hope this helps others looking for similar solution. This filter-hook allows you to add an additional meta_query to the existing search parameters. This will also … Read more