Custom CSS class on meta box

Support General Custom CSS class on meta boxResolved

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #15372
    Ryan LauritsenRyan Lauritsen
    Participant

    Is it possible to add a custom CSS class to a meta box?
    Or have it auto-generate a unique CSS class or ID from the meta box ID?

    I tried adding a class and a custom data-* attribute via custom attributes on a meta box but that doesn't seem to work.

    Thanks!

    #15382
    Anh TranAnh Tran
    Keymaster

    Hi Ryan,

    There's no support for meta box CSS class. But each meta box will have a auto-generated ID. You can inspect and see it.

    #15420
    Ryan LauritsenRyan Lauritsen
    Participant

    I see the auto-generated IDs on post type meta boxes in the admin but not on frontend forms (Frontend Submission extension). The auto-generated ID does not work on user meta boxes either in the admin or on frontend (User Profile extension).

    #16049
    Ryan LauritsenRyan Lauritsen
    Participant

    Anh, can you confirm if this is a bug?

    #16051
    Anh TranAnh Tran
    Keymaster

    Hi Ryan,

    It's not a bug. It's different implementations by WordPress in different areas. I think I'll add an extra param for the meta box for you to add custom CSS class easier. Please wait.

    #16130
    Anh TranAnh Tran
    Keymaster

    Hi Ryan, I've just added class param to meta box settings, which allows you to set an unique CSS class.

    #16131
    philphil
    Participant

    @rilwis, thanks for adding this! I was about to open a feature request for it 🙂

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