Support » Plugin: Meta Box - WordPress Custom Fields Framework » “taxonomy” field is not giving value with latest version

  • Resolved softwebteam


    Hello Metabox Plugin Team,

    Thank you for creating this great plugin and giving us excellent support 🙂

    I am facing issue with latest version 4.14.2. When we use “checkbox_tree” with type “taxonomy” then it is giving “1” value which should be category ids array ( i am using in category list ). This was working perfect with all older version in my all themes but latest version is not giving the values.

    Recently I received one ticket from one of my theme buyer and I found this issue. This is very urgent for me because approx 4000+ buyers are using metabox plugin with my theme. I am waiting for new update with this fix.

    Thanks in advance for your help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tran Ngoc Tuan Anh


    Hi Mahesh, let me check the bug now.


    I’ve just checked the outputted HTML and the values are correct:

    Saving the field will set the correct terms to posts.

    Maybe the bug is elsewhere?

    Thank you sir for your quick response.

    We are getting output in admin but we are not getting checked value output in front-end. I added screenshot with all details. If we check specific category to exclude then that category id is not coming when we use code ( rwmb_meta( ‘godgrace_exclude_pf_categories’, ‘type=taxonomy&taxonomy=portfolio-categories’ ); ) to get value.

    Best Regards,

    Plugin Author Tran Ngoc Tuan Anh


    Hi Mahesh,

    Great image! Thanks for that.

    I notice some issues with your code:

    1 – The options for taxonomy field has changed, please update that. See here. The old syntax still works, but it’s deprecated, kept for backward-compatibility only.

    2 – The taxonomy field is misused here. This field is for setting the terms for current post or page. In the latest version, the plugin use wp_get_object_terms to get post terms. I guess this is the source of bug in your code, as I see you want to “exclude” instead of set terms. I’d suggest using field taxonomy_advanced instead. It’s similar to taxonomy, but doesn’t set post terms. See here for more info.

    3 – The helper function no longer requires type parameter. Try removing it 🙂

    Please try and let me know how it works.

    Thank you sir for your fast support and answer with detail information 🙂

    I have two questions.

    1) If we change type taxonomy to taxonomy_advanced then it removes checked categories and showing all categories uncheck. If we do this change then all buyers have to check again in their website after using updated script theme version. Is there any other way which can fix the issue without affecting users checked category settings?

    2) If we use field_type instead of type then it is not showing checkbox list but showing select menu. I have uploaded screenshot with both coding and output in admin :

    Is there anything missing in my code (in screenshot) to get checkbox list by using field_type? Please advice me so I can correct my coding.

    Thank you for your suggestion to remove type parameter, I will remove it 🙂

    Best Regards,

    Plugin Author Tran Ngoc Tuan Anh


    Hi guys,

    I understand your situation. I’ll try my best to make it work with your current code. Anyway, I’d still recommend to switch to taxonomy_advanced in the next theme.

    @mahesh: the options parameter no longer exists. Please take a look at the docs closely to see how new params are set.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘“taxonomy” field is not giving value with latest version’ is closed to new replies.