edit.php?post_type=weather
isn’t a valid PHP function name.
If you’re trying to set the menu up as a submenu of your custom post screens, I think edit.php?post_type=weather
—the $parent_slug
—should be the first parameter, not the last. ie,
add_submenu_page(
'edit.php?post_type=weather',
'Weather Information',
'Weathers',
'manage_options',
'weathers',
[$this, 'weathers']
);
References
Related Posts:
- How to add custom submenu links in wp-admin menus?
- How to create sub menu with a URL parameter?
- Prevent Admin gui output from page added using add_submenu_page
- How to keep the plugin submenu open on viewing a custom version of users.php?
- Can’t change language (only “English (United States)”)
- How can we make managing lots of pages in WordPress Admin better?
- Taxonomy dropdown metabox in the back-end
- How to redirect/rewrite all /wp-login requests
- Show all post tags on post edit screen/sidebox
- Add “external” link to admin menu in the backend
- Disable image attachment links
- Remove “Time to upgrade” message from dashboard
- How can I enable Google Analytics on a file download link?
- What is the best method to close off the backend?
- Change Login URL Without Plugin
- Change the link of ‘Howdy’ at the top right
- wp-admin pages return ERR_EMPTY_RESPONSE
- Reorder custom submenu item
- Options for restricting access to wp-admin
- Unwanted redirect in admin area
- Looking for a hook to add attachment information to the media library tab
- Load Balanced WP with single server admin access
- How to move wp-admin login page to another location? [closed]
- WP-admin giving 404
- How to control contextual help section by code?
- Can’t access wp-admin Internal Server Error 500
- File exceeds upload_max_filesize, despite max filesize being large enough
- WordPress admin not changing language
- Can’t access dashboard, connection times out (other pages work fine)
- Getting post meta data, while editing a post in wp-admin panel [closed]
- Add custom text to Page Tamplate without need to know html
- Move WP Admin Bar
- Get Stylesheet To Showup in WP Admin Panel Editor
- Just how ‘expensive’ is this function?
- Custom Background-Image not showing up
- js Conflict in admin panel – I guess it’s from the core WP installation
- Why is there an intermediate redirect to https://public-url.org/wp-admin?
- Create a fullwidth dashboard widget
- admin_url in plugins
- Share Tags Between Custom Posts in Admin
- Website looks fine, but login to wp-admin yields a blank screen
- Filter dropdown in users.php “delete user” bulk edit screen
- Cannot find an OLD Gravity Form on an OLD Word Press site [closed]
- /wp-admin/ 500 error
- Where did the screen options menu go?
- How do I change the upload file size limit in single-site wordpress install?
- Can’t call external stylesheet for WordPress admin (using wp_admin_css)?
- WordPress notification reports
- Restore a layout [closed]
- Logging into sandbox subdomain WP
- Page update through theme editor caused wp admin to break
- White screen of death on admin and other dashboard pages
- wp-admin url doesn’t allow to login and redirects to same page
- wp-admin dashboard redirects to homepage
- Can I hook into wp_update_core outside of the admin?
- Renaming wp-admin without hard-coding it. Is it really possible?
- WordPress Side Menu Admin Panel Default Order numbers List?
- Why can I log into wp-login.php and not wp-admin.php?
- Change admin defaults for reading settings
- How to hide Admin Tabs? [duplicate]
- Adding Notification Bubble on Admin Top Bar
- Outputting something based on the presence of post variable in admin screens
- “Add New” button on custom post type grid
- Where is function to prevents non logged users access wp-admin?
- WordPress site stopped working after simply opening header.php in the wp-admin editor
- CSS of the admin panel
- User Profile Avatars
- Ajax requests from front-end with jQuery Fancybox
- Dismiss Admin Pointer Temporarily
- WordPress admin right sidebar isn’t working
- WordPress menu to change page title
- wp-admin blocking causing http error on uploads
- Performance-issue in WP-admin with a lot of posts
- Disable some features in Admin
- DISALLOW_FILE_EDIT is false but I still am not able to edit files from the admin interface and the menus do not show up
- Don’t run code if in customizer or privew
- What hooks should you use to create a table only once?
- Redirect WordPress login for customers but not admin
- Cant access wp-admin
- Unable to open specific posts on WP Dashboard [duplicate]
- How to list newly ftp added HTML webpage under Pages section of wp-admin?
- Hi everyone, I have Problem with using wp_die()
- WordPress wp-admin Page
- How can I trigger a javascript function after a post update on edit post screen in wordpress admin panel?
- restrict admin panel sections to users
- how to set not to be logined in wp-admin except administrator?
- Disable flyout (popup) menus in backend
- WordPress, content editor default type
- Random HTTPs redirections at admin area in shared hosting
- WordPress Login for multiple sites
- Making changes to woocommerce order before save
- Blank sign in page
- add_post_meta displays in admin edit area
- Forcing WordPress Administration onto a separate SSL Host
- How to prevent Google adsense invalid impressions while performing admin tasks on my wordpress site?
- Action for opening edit page in admin?
- What is the point of new confirm admin email process?
- ‘Too many redirects’ error after changing site URL in WordPress [closed]
- Is it possible to tell if a user is logged into WordPress from looking at the cookies which are set?
- Https Website: CSS and JS files load in http and admin page does not load too