Is there a way to encode custom taxonomy and term as query variables in URL? I need it for my custom table derived from WP_List_Table
, where I construct links to filter according to terms.
For example, when I click category Uncategorized
in post list, I get those variables encoded in URL ending in category_name=uncategorized
.
For my case, custom taxonomy is event-categories
and term id is 18.
It is encoded in WP_Query as
WP_Query(['tax_query' => [['taxonomy'=>'event-category', 'terms' => 18]]])