• Resolved Steven

    (@spstieng)


    Hi.

    I’ve added a new field in my Settings->general page, following this example:https://codex.www.ads-software.com/Settings_API

    The field is added (also in my DB), but any data I input is not stored.
    I’m using both add_settings_field and register_settings:

    add_settings_field('site_logo', 'Logo', 'site_logo_callback_function', 'general', 'default');
    register_setting('general','site_logo');

    So why is data not stored when I click the save button?

Viewing 16 replies (of 16 total)
  • Sometimes all we need is a second pair of eyes… ??

    If it’s of interest, you can see a more in-depth usage in a plugin i wrote here.
    code.google.com/p/wp-dashboard-control/source/browse/trunk/dashboard-control/dashboard-control.php

    … which stores several settings in one option.. (simply to see as an example).

Viewing 16 replies (of 16 total)
  • The topic ‘add_settings_field does not save data’ is closed to new replies.