Reply To: Pre-populated table results


Ernest Marcinko

Hi Nate,

This might actually be possible with a custom code. I have made a sample code that may help you out. Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!

This code executes just before the search query is executed, making it possible to alter the final query arguments. Whenever the ‘force_count’ or the ‘force_order’ search arguments are set, it is certainly an auto populate search query.
On lines 9-15 there is a new argument added to the taxonomy filter array, allowing only posts from post_tag taxonomy, that belong to tags with ID 1, 2 or 3. Similarly you can edit this code, just enter the taxonomy you want, and the term ID(s). It will force displaying items belonging to those taxonomy terms only.

I hope this helps!

Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)