You need to hook your function to the admin_menu
action:
add_action( 'admin_menu', 'wpt_add_theme_page' );
Related Posts:
- What’s the best method for emptying an option created with the Settings API?
- Add Admin Menu Inside Construct or Init
- Pause plugin option page until all data manipulation is complete
- Settings API with arrays example
- “Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin
- Passing arguments to a admin menu page callback?
- What are the advantages to the Settings API?
- Where to store plugin settings fields
- Admin settings update updating every time home page is hit?
- What is the recommended way to create plugin administration forms?
- Which to use to execute code during the saving of a plugin settings page?
- Overwriting Core WordPress Functions with Plugins
- How to use the settings API to set multidimensional arrays
- Settings API – Undefined Index when unchecking checkbox
- Disable $title in Plugin Options Screen?
- WordPress Settings API: saving multiple rows of similar data
- Hook event for upload image in the menu
- Menu Error in Admin Console with Custom Plugin: You do not have sufficient permissions to access this page
- add_menu_page() with function inside a class [duplicate]
- How to put placeholder text in the main post input area?
- Unified Approach for Placing Option Pages
- Plugin with specific admin menu icon
- Does settings API create settings on run time?
- Performance of several get_option() calls
- Extend plugin options page
- Can I use the different settings sections over different pages using the save options group?
- plugin development: storing language specific options
- How to add a secondary button to a settings page with a custom action?
- Tabbed navigation for plugin options using same row in database for all?
- OOP Plugin and Menu – Call to undefined function register_setting()
- Settings not set after calling register_setting()
- Using the Settings API, how should I add multiple values to an option?
- GET parameters interfere with my plugin settings
- Plugin settings not saving
- How to add settings subpage from a plugin to a settings page created in theme?
- Remove Internal Style Sheet if no Value Provided?
- null callback in add_settings_section
- Single sanitization callback for multiple fields
- Callback is not called in add_settings_field() when passed as part of an array, but recognises that it’s there. It’s passed Class to Class using OOP
- When to use add_settings_section vs just register_setting?
- How to fix Uninitialized string offset: error on a checkbox in WP Settings API
- Howto: Use Custom Post Types as Submenu Items in Admin
- Plugin development: can’t update settings with multiple settings sections
- Set different custom menu items for different user roles
- Show/Hide ‘add new user’ custom fields in wordpress admin panel by click another field
- Bootstrap doesn’t work on admin menu page-How to override wp-admin style?
- Plugin sub-menu pages recommended structure and links
- The plugin does not save data
- Settings API with arrays example
- Allow users to add / remove settings in plugin
- Update problem with update_option() in combination with register_setting()
- Creating Admin Plugin – Content of a page is displayed at global scope as well
- Silently register plugin pages
- Default settings aren’t used
- Print Dashboard submenu name and filename
- Category select options for plugin settings
- Issue on Checkbox with Custom Option Page
- I am trying to make a page in the admin section similar to the appearance of the Profile page for users
- Unable to get a simple plugin admin page to work
- how to save checkbox data for custom setting?
- Settings API: Setting default option via ‘get_option’ fails
- settings api – add_settings_section not working
- Disable Auto-Expanding Menu in WordPress Admin Menus
- in_array function Problem
- custom wp_editor does not save the content in plugin settings
- Plugin settings are saving but the fields
- Update plugin settings option_name for big plugin update
- Restrict certain actions to plugin-specific admin menu pages only
- Proper way to create an administration page without adding it to the menu
- How to add text editor in plugin menu?
- How to make an admin plugin menu page go full screen?
- It is possible to pass $args that sent by add_settings_field() inside another function?
- Settings API not saving
- Sanitization and validation input fields – Settings API
- Hide / show settings field based on other field’s value
- How to add admin.php to WP Admin Menu Link
- Plugin setting page – update_option problem
- How Can I Update wp_enqueue_scripts () From WordPress Option Page Radio Buttons
- add_settings_error on validating plugin options API
- Convert each new line in the textfield as a new value in an array
- How to Modify My Plugin’s Admin Settings so that the Plugin can be Added to a Specific Page?
- How put the correct URL to sub-menu plugin?
- Developing a plugin where users can edit entries saved in database
- From my Plugin Settings Page use check boxes to load specific css files (e.g. Bootstrap / Foundation)
- Add a description/hint field in the admin page of a plugin
- When using an options array the Settings API isn’t creating the database record
- Forcing ALL plugin Admin menus into a separate menu
- Generate activation url
- Link to a admin submenu item using a custom link
- Settings API with arrays example
- Plugin admin list pages as submenu
- Options don’t save, validation callback not executed
- Menu_slug used for creating options page
- How to delete all the options in an option group
- How to design WooCommerce-like admin tabs for plugin settings page?
- WordPress Plugin default option
- Update custom settings field in plugin
- Settings API not Saving to Database or Display
- Admin Message after Plugin Option Updated
- Show Admin Menu