Support › Meta Box Builder › CSS classes not displayingResolved
I have just installed and purchased Meta Box Builder, and created some simple fields that I want styled with a custom CSS class. I have managed to display the fields on the front end (although I think the documentation on this could be improved, as I bought Meta Box Builder on the premise I wouldn't need to touch the php files).
However, the contents of the metaboxes are not displaying with the style of their custom classes. The custom CSS classes are added in the theme itself through Theme options, so I'm wondering if that might be a problem? The only tutorials I can see add the CSS directly in the .php file.
UPDATE - Adding CSS classes directly into the php file does work, but keen to hear what I might be doing wrong with the Meta Box Builder custom classes field.
Hi, did you try adding CSS classes to the field via custom attributes? Go to tab Advanced, and add a new attribute, name it "class" and enter value = your custom CSS classes.
Joyce didn't reply, but I have the same issue(s). I agree with the lack of documentation for Builder, as opposed to doing it manually.
In this case, I did add a custom css class added via my theme (Customizr Pro) and it didn't work either in the Appearance Tab / Custom CSS or when I added it as an Attribute in the Advanced Tab. I tried applying it to a textarea field.
Is there something else that would work?
Sorry for the lack of documentation. I'll keep adding them.
Regarding the CSS class, please add the class as in this screenshot:
And you'll see this class here:
Hi - I don't recognize that last screen shot, so I assume it's Gutenberg? I'm using the classic editor, so I did a "view page source", and my class wasn't there, even though I set it up the way you showed on the earlier screen.
However, since I want the formatting done on the users' screen, I was able to get what I need by formatting the [rwmb_meta id="zzzz"] in the editor.
I'm sure it will get easier and even more useful as I work through it. Thanks for your help.
If you're using the classic editor, you'll see the class here:
Another note: you can add the CSS class simpler by going to tab Appearance and enter your class into "Custom CSS Class":