Hi I want to find a query to pull the term ID dynamically for the Custom Taxonomy I created using Custom Press plugin.
I am using Follow my blog post plugin to display a Follow button for Custom Taxonomy named as sources.
Since there will be numerous sources, I want to use a query to pull the name of the source based on the user selection.
Please check the following page:
I can show the plugin by hard coding the term id for Indian Express but when user select other source such as Deccan Hearld, it still shows Indian Express due to hard coded Indian Express term id.
The page is currently using:
echo do_shortcode('[wpw_follow_term_me posttype="'.$post->post_type.'" taxonomy="sources" termid="13435"][/wpw_follow_term_me]');
But I want to use something as follows which could display a dynamic button based on the source selected.
Please let me know what do I use in place of "?" in the following code:
echo do_shortcode('[wpw_follow_term_me posttype="'.$post->post_type.'" taxonomy="sources" termid="'.$wp_query->query_vars['?'].'"][/wpw_follow_term_me]');