I have a dropdown field populate tags.
I want to show only 2 tags in this field. I can do that by selecting exclude options and seelect all tags and unselect only 2 tags which i want to show.
But there is a problem with this way. i have to do same steps each time after adding new tags.
I want to show only 2 tags by static values in tags field. How can i do that ?




October 22, 2012 at 12:18 pm
Since you are using check boxes, this goes through the get_categories function. You can use the get_terms_args WordPress hook. This function switches what you have selected to exclude to include. So you will check the boxes for the categories to include in the Formidable settings. This is untested code. Please troubleshoot on your own.
add_filter('get_terms_args', 'frm_customize_term_args', 10, 2); function frm_customize_term_args($args, $taxonomies){ if($args['taxonomy'] == 'category' and $args['exclude'] == '2,5'){ //change 'category' to the name of your taxonomy and '2,5' to the ids of your two tags $args['include'] = $args['exclude']; $args['exclude'] = array(); } return $args; }October 22, 2012 at 3:23 pm
Thank you very much, i tested and it works for now.
In my oppinion, including categories,tags, can be added to options of formidable pro for next releases. This will be good.
Thanks again.
Topic closed.