Custom Fields
Support General Cannot get custom fields to display on a taxonomy page

  • Creator
  • #13821


    I have created a taxonomy called "authors" with the MB Custom Taxonomy plugin and added terms "Agathe Christie" and "Mark Twain". Then with the MB Builder I created some custom fields (country, age) for the authors taxonomy. Then with the help of the MB Term Meta plugin I made those custom fields to appear in the taxonomy term (Agathe Christie and Mark Twain) edit screen. I also created a file "taxonomy-authors.php" in my theme's root. Now the question is how can I display those custom fields values (country and age) on this taxonomy page? I tried all the methods in the documentation (rwbm_meta, rwbm_get_field etc) but cannot display any data:

    $term_id = get_queried_object_id();
    $value = rwmb_meta( $field_id, array( 'object_type' => 'term' ), $term_id );
    echo $value;

    Kind regards,

Viewing 1 replies (of 1 total)
  • Author
  • #13856
    Anh Tran

    Hi Toomas,

    Can you var_dump( $term_id ) to see if that's the correct ID of the current term?

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.