• Resolved cullachie

    (@cullachie)


    Is there a way to re-position the name of the fields above the fields instead of being on the left.
    I want this because I want the metabox on the top right alongside the shipping address in the Woo order page.
    Ay present the metabox is below the addresses and takes up the full width of page.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I suspect possibly a well placed line break with use of the label_cb could help here https://github.com/CMB2/CMB2/wiki/Field-Parameters

    Also, any CSS you know of that would help with that could achieve as well, via the admin_head or admin_enqueue_scripts hooks to add some custom values.

    I don’t think we have any settings for label placement with the field types, but it’s definitely possible I’m missing a detail.

    The wiki is definitely a great place to go and review for a lot of general questions that you may not even have yet https://github.com/CMB2/CMB2/wiki/

    Thread Starter cullachie

    (@cullachie)

    Hi Michael,
    Thanks but I have no competency with CSS or PHP so I’m looking for something that can be applied with copy/paste or some other simple solution.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I can give some scaffolding/starter code to add some style blocks do your admin head area, but beyond that what you’re looking for and exact styling is not something I can predict, so you’re going to need to have at least some CSS knowledge to fine tune this to what you’re looking for.

    Also can you provide the CMB2 config code you’re using thus far, so that I can at least know which fields are being used and match up some HTML classes based on that?

    Thread Starter cullachie

    (@cullachie)

    Because I have only two fields, I found it best to turn off the field names altogether with..
    'show_names' => false, // Show field names on the left

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    that works too.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Field name above field?’ is closed to new replies.