Questions tagged [add-submenu-page]

Adds a submenu page in the Admin section of your WordPress website.

Filter by
Sorted by
Tagged with
0
votes
1answer
18 views

Two e-commerce in two different folders of the same domain

I need to create two e-commerce with woocommerce, one in the main directory of my site in Italian and English for online sales in Europe, and one in a subfolder or subdirectory exclusive for ...
0
votes
0answers
10 views

How do I create drop down menus in word press? Perhaps my theme, minimalist blogger, doesn't support it?

I want to be able to have my pages organized in a drop down format from the main menu on my site such that when the cursor is hovered over the menu item the pages connected to it drop down as ...
0
votes
0answers
18 views

Include default sub-menus with custom admin menus via `show_in_menu`

We have many custom post types are are looking to tidy WP admin. We are creating a custom menu : function custom_admin_menus() { add_menu_page( 'Group1', 'Group1', '...
0
votes
0answers
38 views

Bootstrap Theme Migrated to WordPress

Looking for your expertise, as I'm fairly new using WordPress and I'm in the process of migrating bootstrap theme into it. Problem: I have a navigation menu in the header and want to have a ...
0
votes
0answers
20 views

Custom Taxonomy “Add New” redirects curious

i created a custom post called nt-recipe. i also added a custom taxonomy nt-category Cause I want to control the position of items in the CPT admin menu, I set show_in_menu to false and added this ...
0
votes
1answer
29 views

Add a custom submenu under submenu in a Custom Wordpress Plugin

I know how to add custom menus and submenus for the custom plugin. But for creating another submenu under submenu is what I cannot figure out. What I have: Plugin-Main-Menu Add Update Event What I ...
0
votes
1answer
439 views

Error on add_submenu_page() declaration

Was called incorrectly. The seventh parameter passed to an add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was ...
0
votes
2answers
59 views

What's the correct way of moving a menu page to a submenu

In one of my client sites, the default comment feature is not needed globally. Instead I'm using it only under a certain CPT (eg. Complaints). With the following code, I moved the parent menu item: "...
0
votes
0answers
14 views

How to show different category options on different pages based on parent

I'm putting together a WP Woocommerce site based on fashion and I'd like to show different subcategory options when the user clicks on the parent category from the main menu. For example, if they ...
0
votes
3answers
5k views

The seventh parameter passed to add_submenu_page()

I'm testing WordPress 5.3 (5.3-RC4-46673) with my theme. I have WP_DEBUG enabled. I notice the following error in the dashboard now: Notice: add_submenu_page was called incorrectly. The seventh ...
0
votes
1answer
62 views

Menu with sub-items but without link

while using WP you can change your main menu pretty easy. Still, when I want to create a new menu button, I have to give it a link to some article, category etc. Is there a way to avoid it? In ...
0
votes
1answer
18 views

Submenu Page under Settings in Admin Panel

I have a quick question, I am wanting to add in a new submenu to the 'Tools' section on my Admin Panel but without modifying any of the original WordPress files such as (functions.php, etc..) files. ...
0
votes
0answers
28 views

How can I include a option submenu page on my custom post type menu?

I have this custom post type: // Register Custom Post Type Marca function create_banner_cpt() { $labels = array( 'name' => _x( 'Banner', 'Post Type General Name', 'sc-slider' ), ...
0
votes
1answer
348 views

Same ACF Relationship field for multiple Post Options sub-pages?

How can I ensure that the data saved by an Advanced Custom Fields Relationship field, when on an Options page for a Post type, is separate? Detail below: I have an ACF field group, “Features”, ...
0
votes
1answer
10 views

Admin menu hilighting wrong item for CPT

I have two admin submenu items for my custom post type, but only the first one, "General Settings", hilights when either submenu page is being viewed. add_submenu_page( 'edit.php?...
2
votes
0answers
145 views

How do I add a Gutenberg editor to a custom options page

Can I add a Gutenberg editor to a custom options page (admin submenu page)? How? I'd like to create a editor for a 404-page, but I'd prefer not to use a standard page for it since our clients might ...
0
votes
1answer
331 views

Change order of custom submenu link in WP Admin?

I've added a custom link to WP Admin under the Users menu, but trouble is I can't seem to get it to display above the default options. Is this possible? My code: // Add sub-menu option to users menu ...
2
votes
1answer
97 views

How to avoid creating first submenu page that is same as menu page?

I've created menu page and four submenu pages. public function onixion_admin_menu_option() { add_menu_page('onixion','Onixion','manage_options','onixion-admin- menu',array(&$this, '...
0
votes
1answer
42 views

How to have submenus collapsed until they are clicked?

I have couple of main admin menus and sub-menuse underneath them. Main menu1 Sub menu 1 sub menu 2 sub menu 3 Main menu2 Sub menu 1 sub menu 2 sub menu 3 Like ...
1
vote
1answer
304 views

add multipe sub menus using add_submenu_page

I need to add multiple submeus under a single parent admin menu. i can add submenu using following syntax. function register_my_sub_admin() { add_submenu_page( '/pluginname/includes/admin-menu....
0
votes
1answer
1k views

How to use add_submenu_page() for editors?

Currently I load a custom WooCommerce sub menu point in an own plugin like: // Add an additional submenupoint add_action('admin_menu', 'register_mycustom_menupoint'); function ...
0
votes
1answer
410 views

add submenu page doesn't display

I can't display the submenu of my menu when creating a plugin (Beginner). Could you please help me to find my error? My plugin is well activated and the menu_page appears well add_action('admin_menu',...
0
votes
1answer
774 views

Admin submenu does not call function to load the page

Context I'm making a big plugin with a complex architecture. I would like in my plugin architecture split pages and menus building on admin side. So I have these classes : Menu.php, Submenu.php and ...
2
votes
1answer
2k views

How to give position to Submenu under custom post type

I am trying to add submenu under my custom post type and i succeeded also but it shows just under the post-type, i want to show it under the taxonomy. How to give a position to the newly created sub-...
0
votes
1answer
20 views

Create an administation subpage containing posts in a certain category

I have a website with 3 post-types. My boss wants to create an additional post-type containing only posts from a certain category. For example, I want all the posts under the category "important" to ...
0
votes
1answer
926 views

How to See Everything in get_option()?

In theme and plugin development I like to completely run through everything to make sure there are no issues and I'm not getting any errors. ONLY in development do I add the following in my footer....
3
votes
1answer
12k views

How to add custom submenu links in wp-admin menus?

Is it possible to add custom links as submenu on menu that already exist in wp-admin? Like for example, under appearance section like this:
0
votes
1answer
378 views

Show category and tag link as a submenu under custom post type submenu

I have created a college management menu in admin, under that i have added some sub menus those submenus are of different post types. Those were working fine. But Category and tags are not showing as ...
3
votes
0answers
1k views

How to change menu page capability

Is it possible to change the capability set for a menu page, previously added with add_menu_page()? I have a third plugin installed, that set a menu page created with a 'manage_options' capability, ...
0
votes
1answer
125 views

sub-page settings saving in NETWORK DASHBOARD

In single WP installations, on a plugin's generated sub-page, you put <form action="options.php" ... does the job well. However, in Multisite Network sub-page, options.php doesnt work, nor ...
1
vote
2answers
606 views

Hiding Admin Page While Keeping Menu Expanded

I am creating a custom admin section. I have the following code: // Top level menu add_menu_page('Books', 'Books', 'publish_posts', 'books', 'render_books_page', '', 17); // Adding this function to ...
0
votes
3answers
2k views

How can I add a sub menu to an existing navigation menu in WordPress?

I want to add submenu to a navigation menu in wordPress through code (not through admin panel) and I am totally new to Wordpress. Any help would be greatly appreciated! Thanks!
1
vote
0answers
128 views

Role capability issue

I have a custom sub menu item that has been setup for a long time and all of a sudden today one Role cannot see the item on the Tools menu. They can see a couple of other items on that same Tools menu ...
1
vote
2answers
2k views

Insert & order custom post types in/as submenu

TLDR: While in the backend, I would like to add custom post type inside a menu page (which I can do). But I cannot order the resulting submenu pages. I have 3 custom post types “A”, “B”, “C”, and I ...
0
votes
0answers
432 views

Can't save multiple sections on one page with register_setting

I try to write my first own theme but currently I struggle with making the options with the Settings API. My input values are just not saved and I don't know why. I read this tutorial from Tom ...
0
votes
1answer
510 views

How to keep the plugin submenu open on viewing a custom version of users.php?

I have added to my-plugin submenu a custom view of the user list using users.php and a my_plugin_view argument to filter the request: add_submenu_page( "my-plugin", '...
0
votes
1answer
89 views

How is a widget supposed to reference what is added to custom submenu or addmenu fields?

Stepping into advanced plugin development I've been following along with the Plugin Handbook but I did not see it mentioned how you're to reference what has been added to the settings page. So for ...
0
votes
0answers
185 views

Is it possible to use add_submenu_page() to add an item that's a link to edit another page?

I've recently discovered add_submenu_page and was pleased to be able to add my own page under a specific post type. I'm using a callback function to output some HTML directly /** * Display callback ...
0
votes
0answers
2k views

Adding a submenu to the Tools menu returns tools.php in a popup box

I am trying to add a submenu to the Tools menu. When the custom Tools sub-menu is chosen, I want it to call a function. That function will echo things out to the browser page that is loaded. My ...
1
vote
0answers
559 views

Register submenu on network menu from the subsite

I have a multisite like this: MainSite Site1 Site2 I want to register submenu page on active site in parent page /wp-admin/options-general.php on network in parent page /network/settings.php If ...
2
votes
1answer
40 views

How to change page via login as user and admin

I am using WordPress and I'm trying to develop eCommerce website using WooCommerce. When a user logs in I want to show the following in the menu-bar: Product Category Users profile Orders Cart Then, ...
1
vote
0answers
40 views

Is there documentation reference for forms in menu and setting pages?

Trying to stick to WordPress best practices and improving how I do plugin development I have searched through the codex and developer documentation to see if there is anything indicating what is ...
2
votes
2answers
9k views

Add Settings to Custom Post Type

I have a custom post type called Portfolio. It is associated with three custom taxonomies. This is all working fine. For the archive page, however, I need to add a few custom settings. Due to a ...
0
votes
1answer
781 views

Adding Meta Box to Specific Submenu Page

I've created this page: function wpdocs_register_my_setting() { add_submenu_page( 'edit.php?post_type=task', 'View Tasks', 'View Tasks', 'manage_options', '...
0
votes
1answer
2k views

Adding submenu to custom plugin menu page created with add_menu_page() function

I have created a custom menu page using add_menu_page() function. Everything in that page appears as it should in the screen. What I am trying to achieve is adding another submenu under the under the ...
2
votes
1answer
221 views

Programmatically adding menu items function replicates in multiple menus

I have the following code: add_filter( 'wp_nav_menu_objects', 'dynamically_add_shop_categories_to_submenu' ); function dynamically_add_shop_categories_to_submenu( $items ) { $...
1
vote
1answer
206 views

plugin admin subpage title and links in menu not highlited at current page

In my custom plugin subapges i want to echo their titles specifed in add_submenu_page() but i don't know how do that. This is part of code of my plugin which display links in left-side menu: ...
0
votes
2answers
830 views

Include script files for admin submenu page

I created a sub page to "users.php" where I can add a user in a customized way. I used a lot of the code from "user-new.php". However, user-new.php seems to rely on some javascript file to display the ...
0
votes
0answers
350 views

How to check an admin submenu already exists?

To check if a menu exists, I use this: if ( isset ( $GLOBALS['admin_page_hooks']['menu-slug'] ) ){} But it doesn't work with submenus. How can I do the same for submenus then? Thank you. EDIT: I ...
0
votes
1answer
225 views

Add Admin menus or submenus depending on conditions

I have two plugins in two different files that add a submenu (the plugin title) to the admin panel like this: Plugin 1: function myplugin1_setup_submenu(){ add_submenu_page("mybrand", "My ...