I think the issue may be in your call to add_submenu_page()
:
add_submenu_page('wpsc-sales-logs',...
The first parameter needs to be a reference to your Menu Page’s “slug”, i.e. if you use 'edit.php'
instead you’ll see that you get a menu option under the “Posts” menu page:
add_submenu_page('edit.php','WPEC - Group Pricing','Group Pricing', 7,
'wp-e-commerce-group-pricing', 'price_options');
Here’s what it looks like:
(source: mikeschinkel.com)
So you need to find out what URL fragment (the part past http://yoursite.com/wp-admin/
) that your menu page uses.
UPDATE
For future readers, Roland’s issue was a hook priority issue. Changing priority from 10 to 11 fixed it in his case:
add_action('admin_menu', 'add_options_gp',11);
P.S. You really don’t need the if
statement testing for is_admin()
since you are using the 'admin_menu'
hook; it only fires in the admin.
Related Posts:
- Passing arguments to a admin menu page callback?
- Admin settings update updating every time home page is hit?
- What’s the best method for emptying an option created with the Settings API?
- What is the recommended way to create plugin administration forms?
- How to add a new plugin page under desired Options page?
- Is it possible to add an admin page using add_submenu_page() and pass a var in the query string?
- Overwriting Core WordPress Functions with Plugins
- Naming Admin Menus and Submenus
- Current class on admin menu using add_submenu_page()
- Add Admin Menu Inside Construct or Init
- Hook event for upload image in the menu
- add_menu_page() with function inside a class [duplicate]
- How to add Font Awesome 5 icons in WP Admin dashboard menu?
- How to put placeholder text in the main post input area?
- Unified Approach for Placing Option Pages
- Plugin with specific admin menu icon
- OOP Plugin and Menu – Call to undefined function register_setting()
- Global State During an Admin Post
- Howto: Use Custom Post Types as Submenu Items in Admin
- Sub Menu content is being duplicated
- 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?
- is it recommended to use WP_List_Table?
- Plugin sub-menu pages recommended structure and links
- Creating Admin Plugin – Content of a page is displayed at global scope as well
- Add a page in admin without adding menu item
- Silently register plugin pages
- WordPress theme options Menu
- Print Dashboard submenu name and filename
- 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
- Disable Auto-Expanding Menu in WordPress Admin Menus
- in_array function Problem
- Use options to control jQuery plugin
- Restrict certain actions to plugin-specific admin menu pages only
- Proper way to create an administration page without adding it to the menu
- Pause plugin option page until all data manipulation is complete
- How to add text editor in plugin menu?
- How to make an admin plugin menu page go full screen?
- How to add admin.php to WP Admin Menu Link
- Convert each new line in the textfield as a new value in an array
- How put the correct URL to sub-menu plugin?
- Developing a plugin where users can edit entries saved in database
- Add a description/hint field in the admin page of a plugin
- Forcing ALL plugin Admin menus into a separate menu
- Link to a admin submenu item using a custom link
- Plugin admin list pages as submenu
- Change Admin menu placement using hooks
- Menu_slug used for creating options page
- How to design WooCommerce-like admin tabs for plugin settings page?
- Show Admin Menu
- Default table collation on plugin activation?
- How to implement color picker from wordpress in my plugin?
- Nonces can be reused multiple times? Bug / Security issue?
- How to auto-upgrade my plugin?
- How to Add a .js file Only in one specific Page Dynamically to Head
- Missing “category_children” option when dynamically creating categories via a plugin
- How to use mysql IN statement with wpdb update method?
- Bridge WordPress Media API with custom tinyMCE plugin [closed]
- What’s the better way to add an inline script?
- How to assign a WP 3.0 custom nav menu to a theme’s navigation menu location via script?
- How to avoid loading same script twice?
- Is there any way to check for user login and send him to login?
- Can I individually style items in the backend widget list?
- Why is my javascript not invoked in my hooks except wp_head?
- How to Create database table when Plugin installed/activated, and delete database when Plugin deleted
- Add a class to a dynamic sidebar’s wrapper
- Issue regarding $wpdb->prepare()
- Change the look and feel of admin pages
- how to search users by ajax live search
- Generate JSON files for language translation from po file without wp-cli i18n make-json
- Run Shortcode of post’s custom field in functions.php / Plugin
- load_plugin_textdomain doestn’t work with add_action plugins_loaded
- wp_get_post_terms Order by not working
- Naming conventions when using (PHP5) namespaces?
- Readme.txt seems to be cached but not the version
- Issue on Checkbox with Custom Option Page
- Encoding Method for URLs?
- How to get post meta in functions?
- Plugin access to average users not only admin
- Rewrite not working since upgrade to 5.9
- Why won’t this submenu page show? – My First WordPress Plugin
- ACF Field value in wordpress login message filter
- Overriding the template files using a plugin for all themes
- Plugin removes itself if mistake made during edit
- Using meta_key & meta_value in add_rewrite_rule
- Custom Registration Form and Passwords
- Determine if the current page, is being edited
- Fullwidth slider using background image Flexslider WordPress
- Return value of $wpdb->update() query in plugin is wrong
- Plugin files not updated (cache cleared)
- How can I pass value to function in add_menu_page?
- How to add additional field in a table row after creating a table?
- WordPress plugin tables become corrupt
- How to call a new php page inside a plugin page?
- How can i call from custom fields to the category editor?
- Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?
- If I want to create new taxonomies (e.g. Project / Documents / Etc…) is it better to create them in the theme’s functions.php or within a plugin? [duplicate]
- How to use register_setting()