Custom Fields
Support MB Relationships Get Relationship Metabox Title

  • Creator
  • #27714
    Resolved Ryan Oliver

    How can I retrieve the title of the Meta Field used to define a Relationship?

    I'd like to render the title of the Relationship Metabox field in my page template.

    Screenshot of MB Relationshps Metabox Title

Viewing 1 replies (of 1 total)
  • Author
  • #27740
    Long Nguyen

    Hi Ryan,

    Each relationship meta box has an ID: {$relationship_id}_relationships_from and {$relationship_id}_relationships_to. You can use these IDs to get the meta box registry information. For example

    $meta_box_registry = rwmb_get_registry( 'meta_box' );
    $registry = $meta_box_registry->get('{$relationship_id}_relationships_from');

    Get more details here

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