You’re getting that error because the 5th parameter for add_submenu_page()
should be a string which is the menu slug and yet you supplied a callback ([$this,'sports_info_page']
). So be sure to use a valid slug like so and the error will be gone:
add_submenu_page(
'sports_info', // parent slug
'Sports Information', // page title
'Sports Information', // menu title
'manage_options', // capability
'your-menu-slug', // menu slug
[$this,'sports_info_page'] // callback
);
Related Posts:
- Creating WordPress Plugin solely for Admin panel with dash menu and submenus
- Creating a nav menu
- Why WP_Screeen doesn’t show all options with admin_body_class
- $pages = get_pages(‘child_of=’.$post->ID); Why arguments are concatenated?
- WordPress Custom Menu Admin helper plugin
- How do you add a settings page to another menu?
- Settings options not showing up on Sub Menu page in WordPress plugin
- Submenu Page under Settings in Admin Panel
- Horizontlal scrolling content
- Add subemenu option page
- Ajax Not Working If The Handler is Located Outside Plugin Submenu Page Function
- How can I allow commas in tag names?
- wp.media update options and force render on uploader
- Automatically install wordpress plugin at theme activation
- Restrict individual category combinations
- Installing Facebook comment plug in without loosing all previous wordpress comments?
- How to show custom message once on plugin activation?
- How to notify users of blog updates a la Admin Plugin Update notifications?
- wp_schedule_event / cron_schedules – custom recurrence time not working in Plugin
- How to set “with_front’=>false” to a plugin-generated cpt?
- plugin shortcodes not working on custom theme- unsure how to fix
- How ( and mostly at what time ) can i prevent the alternate cron from running?
- What is the function to get plugin base url in multisite?
- Change “From” name in MailChimp STS plugin [closed]
- PDF download – use wordpress functions
- How to add Edit | Delete button on rows?
- Multiple Domains with Single WordPress Install
- API to filter new user registration $POST data?
- WordPress shopping cart that supports 2 tier product variation options
- Possible htaccess configuration issue for HTTPS websites by WP Fastest Cache plugin? [closed]
- How to Display a Plugin function (content) on frontpage using index.php
- How can I disable the multisite feature of WordPress 3.0?
- How to translate __(”) strings in admin [closed]
- link bbpress forum discussion to blogposts
- WordPress comments not appearing in blog posts, likely because of Redux template. Could I fix this with a plugin that adds a comment form as a block? [closed]
- How to install/enable mediaelement.js plugins in WordPress
- CampaignMonitor for WooCommerce – Move subscribe button [closed]
- Calendar Plugins – Featured Widget [closed]
- External Domain on WordPress Multisite
- Customize permalink wordpress category id
- Translation for the plugin using redux framework does not work
- Re use the list table for a custom post type on another page
- Customize The Events Calendar to Include an Option to Expand for More Events Listings
- Hook into existing tinyMCE button
- Does the lazyload plugin make this server disks busy?
- Load Javascript from Plugin in One Page Only?
- How does one include the JQuery UI plugin to wordpress and enque it correctly in a plugin form?
- the_post hook is not firing for me
- Invalid plugin installation directory, Google Analytics [closed]
- Create WordPress posts from JSON array using plugin in admin
- Custom url rewriting
- How can I exclude a dynamic URL to show a popup created using ‘WordPress Popup’ plugin
- How can I apply a WP filter on specific plugin version
- How to create Admin Notice from Plugin with argument? [duplicate]
- Why are my WordPress store items showing up in duplicates?
- Can I do in-page changes binding events/triggers to actions in WordPress?
- Proper way to handle admin-ajax calls
- How to find the list of custom post type where logged in user is author
- YOAST Seo xmlsitemap menu item not showing in the dashboard [closed]
- Regularity of Checking for plugin updates? [duplicate]
- Possible?? Pull Plugin Property Data to a Theme’s Custom Post Type
- WordPress plugin require_once unexpected
- Action on WordPress Install
- What hook can I use to modify custom post data before it is displayed on the page?
- reCAPTCHA on page template without plugin
- get current page number with wp_link_pages()
- Is there a way to input different rel=author and rel=publisher attributes for a WP blog w/ multiple authors?
- Plugin is creating posts twice
- Accessing widget information
- Update WordPress Theme System
- How do I reliably find a URL to a script or other file?
- What is the best way to make a custom page from a plugin?
- Setting text widget to one page only
- Searching a tab/space delimited text file based upon form criteria and returning a ‘record’ into a word press results page
- How to validate custom fields in Quick edit/bulk edit?
- Oops! That page can’t be found
- Fixed: Console.log twice in the edit function
- How to generate expiring URL of the page?
- Redirect to a page while maintaining search query parameters without causing an infinite loop
- Is it possible to place a WordPress widget into the main page layout?
- How to make slider like this in wordpress?
- Showing different js file for different theme in wordpress customizer api
- Function settings_fields() not recognized (Uncaught Error: Call to undefined function settings_fields())
- Update User Meta Via Ajax
- how to make settings page for woocommerce plugin?
- what’s different between wpdb->prefix and table_prefix
- How to use custom footer template in a site-plugin?
- Top authors or top categories by post views?
- Standalone Project Login with WP Login
- Need help getting a certain value out of a multi dimensional array
- Proper Failure of Plugin Activation
- Extend WordPress Search
- WordPress internationalization + domains
- How to use wordpress with any “site url” (the url in settings) for development?
- How do I output user_registered time in my correct timezone?
- WooCommerce Order Status Displays Twice on Order Page
- how to search through plugin in wordpress cimy-user-extra-fields?
- How to change prices per number ordered in WooCommerce [closed]
- Scripts don’t enqueue after removing plugin
- Plugins menu not on dashboard