Term query with meta_key
-
Hi!
Here is my situation:
I would like to use ALM to load Terms with a
meta_query
included. In my scenario, my taxonomy isshow
and themeta_key
isnetwork
.After reading this documentation, it seems the best way to accomplish this is with a filter hook. And I have it working! Here is my hook:
function network_show_list($args){ $args['meta_key'] = 'network'; $args['meta_value'] = 20377; return $args; } add_filter( 'alm_term_query_args_network_show_list', 'network_show_list', 10, 2);
And here is my shortcode:
[ajax_load_more id="network_show_list" term_query="true" term_query_taxonomy="show" term_query_hide_empty="false"]
That works! My problem is, I cannot figure out how to make it dynamic. I need to somehow pass the
meta_value
from the page to the filter.I’ve also read this documentation, which has hooks for the core plugin. One of those suggests you could pass it as a variable in the shortcode… but that’s not working.
Ideas? (I am a paying user. Thanks for this plugin.)
- The topic ‘Term query with meta_key’ is closed to new replies.