• Hi, WordPress Gurus!

    I’m looking for a way to add a class or id selector to the add_settings_fields tag. I need to be able to format some of the fields through css, or at least put them into some divs or something.

    I know I could throw a div in the callback function of each field, but that would leave the Title of the field (on the left) out.

    Is there any possible way to do that?

    This is the function that outputs the options page:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Edit: I’m rethinking now… I would also need to wrap some settings_fields under the same section and format it differently. So I’m gonna need a class or id for the section too. Isn’t there in the Codex some kind of attributes for that?

Viewing 1 replies (of 1 total)
  • Thread Starter Javier Schvindlerman

    (@javistuff)

    Sorry for putting the code directly in.
    I would paste it from pastebin, but I cannot embed it, so.. I guess I just don’t know how to.
    Anyway, I think you’ll understand my question even without the code.
    🙂

    Got it:

    http://pastebin.com/xicJRfea

Viewing 1 replies (of 1 total)

The topic ‘Adding class or id to add_settings_fields’ is closed to new replies.