Custom Fields
Re-Envisioned
Support MB Relationships Cannot hide relationship

This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 1 week, 3 days ago.

  • Creator
    Topic
  • #14890

    ecurtain
    Participant

    I’m trying to create a relationship where the “to” side is hidden:

    
    define ( 'TYPE_PRODUCT',        'product' );  
    define ( 'TYPE_INDUSTRY',       'industries' );
    define ( 'PRODUCT_TO_INDUSTRY', 'product_to_industry');
    
        MB_Relationships_API::register( array(
            'id'   => PRODUCT_TO_INDUSTRY,
            'from' => array(
                'object_type' => 'post',
                'post_type'   => TYPE_PRODUCT,
                'meta_box'    => array(
                    'title'         => 'Linked Industries',
                ),
            ),
            'to' => array(
                'object_type' => 'post',
                'post_type'   => TYPE_INDUSTRY,
                'meta_box'    => array(
                    'hidden'        => true,
                ),
            ),
        ) );

    But I cannot get the “to” side to be hidden. I’ve tried moving the ‘hidden’ parameter around and using ‘true’, without success.

    Can you assist? thanks.

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #14901

    Anh Tran
    Keymaster

    Hi @ecurtain,

    Can you try the latest version on Github? I’ve fixed that here.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.