add class to add_settings_field
-
Using the settings api to build a plugin options page, is it possible to add a css class to the $title in add_settings_field
<?php add_settings_field( $id, $title, $callback, $page, $section, $args ); ?>
If $title=”My Text” this outputs html like this
<table class="form-table"><tr valign="top"><th scope="row">My text</th>
I would like to be able to add a class to the <th> tag, like so:
<table class="form-table"><tr valign="top"><th scope="row" class="myclass">My text</th>
How/can this be done with add_settings_field?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘add class to add_settings_field’ is closed to new replies.