• Resolved usernames_are_hard

    (@usernames_are_hard)


    Hello All

    I have managed to make an options page using the instructions here: http://codex.wordpress.org/Creating_Options_Pages#See_It_All_Together. I followed the recommended link to Otto’s tutorial.

    All works as expected. I can add fields, they save as expected, the values are returned if populated and validation works nicely.

    My only “issue” arises when I try to make a standalone menu item using the add_menu_page() function. When I submit a form, I do not see the notification box saving that it was saved or an error, however, the data is saving (or failing validation) as expected.

    The problem only occurs when I use add_menu_page(). If I use add_options_page()… all is good.. however, I do want a separate menu group so add_options_page() is not suitable.

    A simple work around is to add settings_errors() to my options page, which will make the notification box show… However, seems like a dirty fix the issue might be some poor implementation.

    I have added the code below.. if it is obvious to anyone what my issue is, I would appreciate feedback. Thanks

    [code moderated - use the pastebin for any code over the forum limit of ten lines]

Viewing 1 replies (of 1 total)
  • Thread Starter usernames_are_hard

    (@usernames_are_hard)

    Hi All

    Sorry for not using pastebin… pastebin.com is blocked on my current network thanks to websense.

    I am going to resolve this for now, and use my fix (see below).

    <h2>The heading of my settings page</h2>
    <?php settings_errors(); ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Creating Options Pages – add_menu_page()’ is closed to new replies.