Custom Fields
Re-Envisioned
Support MB Frontend Submission Unable to exclude metabox field with Meta Box Include Exclude

This topic contains 4 replies, has 2 voices, and was last updated by  Anh Tran 3 months, 4 weeks ago.

  • Creator
    Topic
  • #10557

    Orice Media SRL
    Participant

    I am using Frontend Submission and trying to exclude a metabox field from frontend. I have tried the following:

    $meta_boxes[] = array(
        'id'         => 'projects',
        'title'      => 'Setari proiecte',
        'post_types' => 'proiect',
        'context'    => 'normal',
        'priority'   => 'high',
        'fields'     => array(
            array(
                'name' => 'Continut',
                'id'   => 'bgt_content',
                'type' => 'textarea',
                'rows' => 20,
                'exclude' => array(
                    'ID' => array( 48 ),
                ),
            ),
    );
    

    and

    $meta_boxes[] = array(
        'id'         => 'projects',
        'title'      => 'Setari proiecte',
        'post_types' => 'proiect',
        'context'    => 'normal',
        'priority'   => 'high',
        'exclude' => array(
            'ID' => array( 48 ),
        ),
        'fields'     => array(
            array(
                'name' => 'Continut',
                'id'   => 'bgt_content',
                'type' => 'textarea',
                'rows' => 20,
            ),
    );
    

    But none of them are working.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #10574

    Anh Tran
    Keymaster

    Hi Orice,

    The Meta Box Include Exclude was created before the MB Frontend Submission quite a long time. So, it checks well in the backend only. I’ll make an update to support frontend soon next week.

    #10587

    Anh Tran
    Keymaster

    Hi Orice,

    I’ve just updated both Meta Box Include Exclude and MB Frontend Submission. Now they work well together and you can set rules to show/hide meta boxes in the frontend.

    #10697

    Orice Media SRL
    Participant

    Thank you, but I found another way to do it. By creating 2 boxes, one for frontend and the other for backend only.

    #10710

    Anh Tran
    Keymaster

    It’s a good alternative solution!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Unable to exclude metabox field with Meta Box Include Exclude’ is closed to new replies.