I am trying to add my own plugin option to the Easy digital downloads plugin. The sample code is here:


I have added another register setting in the register_option


And in the form I get the option

$displaynotes = get_option( 'owlish_display_notes' );

and I have there two settings_fields callings

<?php settings_fields('owlish_license'); ?>
<?php settings_fields('owlish_settings_group'); ?>

And in the form I have the checkbox above the submit button

  <table class="form-table">
    <th scope="row"><?php _e('Show notes?', 'owlish-textdomain'); ?></th>
    <td id="front-static-pages">
    <legend class="screen-reader-text"><span><?php _e('Show notes?', 'owlish-textdomain'); ?></span></legend>
    <li><input type="checkbox" name="owlish_display_notes" value="1" id="owlish_display_notes" <?php checked('1'==$displaynotes); ?> /><label for="show_notes"> <?php _e('show notes', 'owlish-textdomain'); ?></label></li>

This is all I added to the EDD sample code. The problem is, I can only save one of those options. If I have the both settings_fields calls active, only the owlish_display_notes are saved. If I comment the settings_fields('owlish_settings_group'); out, then the license is saved, but not the notes.

This is driving me nuts. I am ok with the settings saved in each table row in the options for now, it just should work.

What am I missing here? Thanks so much

1 Answer 1


take a look at https://tommcfarlin.com/multiple-sections-on-wordpress-options-pages/

You can...

add_settings_section("owlish_license", "SECTION NAME", null, "theme-options");
add_settings_section("owlish_settings_group", "SECTION NAME 2", null, "theme-options");

add_settings_field("owlish_display_notes", "Display Notes", "callback1", "theme-options", "owlish_license");

add_settings_field("owlish_display_notes2", "Display Notes 2", "callback2", "theme-options", "owlish_settings_group");

after you can use this wrapper on page


Have a nice day.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.