How to add a custom id to the "rwmb-meta-box" wrapper

Support MB Term Meta How to add a custom id to the "rwmb-meta-box" wrapperResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8328
    uththamaguththamag
    Participant
    1. How to add a custom "id" to the
      <div class="rwmb-meta-box" data-autosave="false" data-object-type="term"> wrapper.
    2. Also "rwmb-input" wrapper(<div>) should floated to the right side.The layout is not nice currently all items are floated to the left side.

    3. rwmb-meta-box wrapper is append after the <div class="edit-tag-actions">

    Are there any solutions?

    Thanx
    UG

    #8348
    Anh TranAnh Tran
    Keymaster

    Hi UG,

    Thanks for your questions.

    1. Currently, the wrapper div is not extendable. Can you tell me why do you need an ID?

    2. Does the custom field have the name setting? Can you post a screenshot? It suppose to have the same table layout as other WordPress fields for terms.

    3. That's right. It's the only place that WordPress provides hook to show other custom fields. We can't change it.

    #8353
    uththamaguththamag
    Participant

    Hi,

    1.I want to write some CSS to fix the layout issues. Is it possible to do that?

    2. Yes. Below is my code

        $meta_boxes[] = array(
            'id'         => 'service_tax',
            'title'      => null,
            'taxonomies' => 'categories', // List of taxonomies. Array or string
    
            'fields' => array(
                array(
                    'name'             => esc_html__( 'Featured Image', 'codice' ),
                    'id'               => "{$prefix}tax_thumb",
                    'type'             => 'image_advanced',
                    'max_file_uploads' => 1,
                    'max_status'       => false,
                ),
            ),
        ); 

    Post a screenshot to where?

    3. It should append before the <div class=”edit-tag-actions”>.

    #8383
    Anh TranAnh Tran
    Keymaster

    Hi UG,

    1. If that's the case, then you can use the id automatically created by WordPress. Each meta box will have a unique ID the same as the ID settings. See this screenshot:

    https://i.imgur.com/yP1KjMq.png

    2. I've seen the issues with the code. No need screenshot anymore. I will check and fix it asap.

    3. I've checked and seen the fields appear before .edit-tag-actions. Here is how it appears on my side:

    https://i.imgur.com/M7XcDOv.png

    PS: To upload the screenshot, you can use this app: https://getsharex.com/. It auto uploads images to imgur.com after taking screenshots. Then just paste the image URL here.

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