Check if CPT Field from MB Relationships has custom taxonomy term

Support MB Relationships Check if CPT Field from MB Relationships has custom taxonomy term

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #37439
    EugeneEugene
    Participant

    Hello

    Can you help me a bit)

    Given:
    — CPT "event" with custom taxonomy "event-status"
    — CPT "performance"
    — MB Relationships "Event-to-Performance"

    I'm using this code to display field value from CPT "event" on the single post page from CPT "Performance"

    <?php rwmb_the_value( 'some-custom-field' ); ?>

    How can I check if this field has custom taxonomy term?
    And don't display field if not.

    p.s. using MB AIO and Bricks builder.

    #37445
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Can you please let me know which field type is? Is that a taxonomy field? You can just create an if statement to check and display the field value. I don't know if the Bricks builder supports this case but you can use the code to do that. Please read more on the documentation https://docs.metabox.io/fields/taxonomy/#data

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