Pulling Details from Custom Taxoonomy

Support MB Views Pulling Details from Custom Taxoonomy

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #39839
    bfrye@cgmagonline.com[email protected]
    Participant

    I am trying to pull the custom fields of the assigned custom post taxonomy on the post using views. I currently cant get it to pull the assigned custom taxonomy, any help would be amazing!

    {% set post_term = mb.get_the_terms( post.ID, 'taxonomy-slug' )[0] %}
    {% set term_meta = mb.rwmb_meta( 'field_id', {'object_type': 'term'}, post_term.term_id ) %}
    <div class="authorbio">{{ term.bio }}
    </div>
    #39869
    PeterPeter
    Moderator

    Hello,

    Please try to change the code to get the term meta to this one

    {% set term_meta = mb.rwmb_meta( 'field_id', {object_type: 'term'}, post_term.term_id ) %}
    

    then output it

    {{ term_meta }}

    #39873
    bfrye@cgmagonline.com[email protected]
    Participant

    This will pull from the custom taxonomy, or will I still need to add that signifier in elsewhere?

    #39890
    PeterPeter
    Moderator

    Hello,

    Sorry, I do not understand your question clearly, can you please clarify it? Does the code work on your end to get the term meta?

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.