Add a top level menu page.

learn more… | top users | synonyms

0
votes
0answers
13 views

Dynamic admin submenu

I'm creating a plugin for WordPress with dynamic sub-menu's fetched from the server. Putting the dynamic loading of sub-menu's into the menu_setup() hook function would slow down other WordPress ...
0
votes
2answers
39 views

Is it possible to have dynamic post id # in add_menu_page()?

I use the add_menu_page function in my custom theme builds but when I export my local copy of the site and import it in the production site some of post id numbers change and I have to update this ...
0
votes
1answer
14 views

Cloning admin pages like users.php

In my project I want to make a new menu position which will be actually a copy of 'Users' page but with some additional filters/modifications. For example as a result I need to have another menu ...
4
votes
1answer
102 views

What is the use of $page_title and how to use it?

I'm developing a WordPress plugin and added add_menu_page() but not sure what is the use of first parameter $page_title. If this is to use to display page title on the plugin page then how can I do ...
0
votes
0answers
53 views

Add custom page link with anchor

In my admin section I would like to add in Appearance > Menus > some custom pages to add to my menu. I have two different menu one for the home page and one for the others pages. In my home page menu ...
0
votes
1answer
51 views

Add a page in admin without adding menu item

In my plugin I have registered a menu_page; now I need another page. How can I add another page to my plugin without adding another menu item? Is it possible to call it by href?
0
votes
1answer
21 views

Plugin page and capabilities

i´am developing my own WP plugin with custom functions and i would like to show the new submenu in the standard admin panel for everyone, who logs in. My code: $capa = 'administrator' or 'author' or ...
0
votes
0answers
48 views

Wordpress theme-menu-page & siblings position

I'm registering theme menu page using following lines : add_menu_page(__('myTheme', 'myplugin'),__('myTheme', 'myplugin'), 'edit_posts','mytheme','my_plugin_dashboard', 'dashicons-forms', 30); ...
0
votes
0answers
122 views

Add custom menu link to Parent drop menu (Page Attributes)

if it possible to add custom menu link to parent drop menu in page? i am using custom menu link as parent item in menu (without really link). i have create this link using: Appearance -> Menus -> my ...
1
vote
1answer
483 views

Theme Options page not showing up in admin menu

I'm currently developing a WordPress theme and would like it to have a preferences pane in order to specify the user's Google Analytics tracking code for example. Following the instructions I got on ...
0
votes
2answers
119 views

add_menu_page with no link

I wanted to create an admin menu in WordPress that does not go to a page when you click it. The Menu would be as follows. Members <-- Top Level View Members Add Members "Members", the top level ...
0
votes
0answers
49 views

How to add a taxonomy into admin menu

I've added a admin menu by add_menu_page function. How can I add a taxonomy in this menu as a sub-menu? If it's impossible, How can I change layout of custom post type?
1
vote
1answer
116 views

Is there any way to add absolute path for add_menu_page function?

I am creating a plugin for add menu option to WordPress admin and using below function for that: <?php add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, ...
0
votes
0answers
18 views

Make a menu link in Admin link to frontpage editor?

I have a page set up as my Frontpage. I'd like to have a link under the pages menu in the admin that says something along the lines of 'Edit Frontpage', which redirects to the editor or this specific ...
0
votes
2answers
2k views

Show custom taxonomy inside custom menu

I have a custom menu using add_menu_page: add_menu_page('My menu' , 'Some text', 'read', 'nwcm'); Under it, I show a custom post type menu item; // Create the news custom post type ...
0
votes
1answer
215 views

Add_menu_page() error message -> “You do not have sufficient permissions to access this page”

I'm currently building a website for a friend and have assigned him the user role of editor. I don't want to give him an administrator role in case he breaks the layout. Anyway, I am using ...
0
votes
1answer
62 views

Highlighting admin submenu pages

Here is my plugin's current menu/submenu structure: add_menu_page('Sunshine', 'Sunshine', 'sunshine_manage_options', 'sunshine_admin', 'sunshine_dashboard_display', plugins_url( ...
0
votes
1answer
115 views

add_menu_page does not seem to work in a class

Here is some of my code: class proposal { function __construct() { add_menu_page('Topic Proposal', 'Topic Proposal', 'read', 'topic_proposal', array(&$this, 'writer_page'), ...
0
votes
1answer
664 views

wordpress add_submenu_page not working

I have a built a plugin which creates a custom menu like this: add_menu_page( 'Wholesale Pricing', 'Wholesale', 'manage_options', 'woo-wholesale', 'woo_wholesale_page_call'); I am now trying ...
0
votes
1answer
424 views

add_menu_page include a php page from theme directory

I have added some custom tables to a wordpress and trying to add wp-admin section to manage them. By using following code I have successfully added a menu item in wp-admin but I'm unable to call the ...
-2
votes
1answer
86 views

wp_nav_menu() doesn't assign proper class to elements and it forces wrapping the ul element

I'm having trouble with wp_nav_menu function. I want the menu to have no div wrapper; have the class sf-menu right for ul element of the menu and li elements not have any classes. I've tried many ...
0
votes
0answers
117 views

Load a template for add menu page

How to load a template from twentytwelve theme for add menu page function. add_action( 'admin_menu', 'register_my_custom_menu_page' ); function register_my_custom_menu_page(){ add_menu_page( 'custom ...
0
votes
1answer
176 views

Add menu item to edit specific page

I have pages setup and want a top level menu item to direct to editing a specific page. I'm reading through add_menu_page and it doesn't list how to get to specific pages or posts edit page. ie ...
1
vote
0answers
103 views

How can I highlight a top level dashboard menu item created for a custom taxonomy?

I've used add_menu_page() to create a top-level dashboard menu item for a custom taxonomy. This is due to some specific needs with respect to this plugin. The menu item works fine, but when you ...
0
votes
1answer
413 views

Issue on Setting $icon_url Parameter on WP add_menu_page()

I am trying to create a custom Menu by using the WordPress add_menu_page() function. I think I understand the whole function parameters as Codex point it out as: <?php add_menu_page( ...
1
vote
2answers
736 views

Admin Menus - Name Menu different from first Submenu [duplicate]

I am creating a submenu with the following code: add_action( 'admin_menu', 'jp_create_admin_pages' ); function jp_create_admin_pages() { add_menu_page( 'Members', 'Members', ...
3
votes
1answer
3k views

Generate Advanced Custom Fields box in custom admin menu page

I have created an custom admin menu page called FCC Youtube with add_menu_page function which has some custom fields I manually generated via HTML and PHP: code ( just the part how I created this ...
0
votes
1answer
147 views

Pass custom css class to add_menu_page

My theme currently uses add_menu_page() in order to display the theme options sections on the left hand admin menu. I would like to be able to attach a parent css class to the main menu item in order ...
0
votes
1answer
97 views

add_menu_page() with variable function

How can I use add_menu_page() functions some variable function ? add_menu_page('My page','My page','manage_options','my_page', 'func' ); $func = function() { echo "Done !"; }; I know I can ...
1
vote
2answers
160 views

Enqueueing Scripts on a Custom Top-level Menu Page

I've created a menu page using the following function: add_menu_page( 'Nonpareil options', 'Nonpareil options', 'administrator', 'nonpareil_theme_options', 'nonpareil_theme_display' ); ...
2
votes
2answers
7k views

How to use a WordPress' existing admin icon?

I use the add_menu_page function to add an new admin menu: add_menu_page( 'Custom_menu', 'Custom_menu', 'edit_posts', 'custom_slug', '', 'wordpress_existing_icon', 5 ); ...
1
vote
1answer
52 views

how to open page, defined in plugin, from dashboad widget

I have a plugin that adds a number of admin pages, and drives two page templates for the public facing documents. It also loads one dashboard widget for "subscribers". In this widget is a list of ...
26
votes
2answers
13k views

add_menu_page() with different name for first submenu item

The add_menu_page documentation says to pass the menu title as the second parameter: add_menu_page('Page Title', 'Menu Title', ...); When adding more pages later via add_submenu_page, the main page ...
0
votes
2answers
146 views

How to add admin bar only page?

I successfully managed to create admin bar item using this: add_action('admin_bar_menu', 'toolbar_link_to_mypage', 999); function toolbar_link_to_mypage($wp_admin_bar){ global $wp_admin_bar; ...
0
votes
1answer
292 views

How to add custom menu item on plugin activation?

When my plugin is activated, I would like to add a new menu item. Here is my code: class My_Plugin { function __construct() { register_activation_hook(__FILE__, array($this, 'install')); } ...
5
votes
2answers
3k views

do_shortcode() within Admin Page

I'm using a few plugins that have shortcodes ... however, instead of creating a public page for the content, I've created some new pages within the admin using add_menu_page and I need to know how to ...
0
votes
2answers
836 views

How to point “add_menu_page” to HTML file rather than PHP function

I added a new menu item for my plugin like this: add_menu_page( 'Control Panel', 'My Plugin', 'manage_options', 'control-panel', array($this, 'control_panel_page'), ...
1
vote
1answer
530 views

Associating custom submenu item with post type of top level menu item

I'm working on a plugin that sets admin menu submenu pages on all different post types. I need to be able to associate these new submenu pages with the corresponding post type of the top level menu ...
0
votes
2answers
1k views

How can I add/update post meta in a admin menu page?

I wanted to create a plugin to batch manage posts' custom field data. I know I can add post meta by add a meta box in post edit screen and use add_action('save_post','function_to_update_meta') to ...
3
votes
1answer
397 views

Add highlighting to new Admin Dashboard Menu Item

I have implemented a Custom menu item in my wordpress dashboard using the following command in the functions.php function create_menu() { $settings_page = add_menu_page('Edit_Post_69', ...
1
vote
1answer
34 views

Determine Registered Admin Menus

Is it possible to obtain a list of which Top Level Admin Menus have been registered via some plugin? I'm talking about menus registered with: add_menu_page();
3
votes
3answers
3k views

How to remove duplicate link from add_menu_page

In the theme admin menu below, the "MyTheme Menu Label" is being duplicated twice on the sidebar menu, once for the main menu link and again for the first submenu link. How can I remove the 2nd ...
0
votes
2answers
787 views

Add submenus to Theme options menu

My theme currently has a single menu on the left hand sidebar of WP admin. I want to include submenus on that menu. How can I add, for example, a single submenu item to the "Theme Options" menu ...
4
votes
1answer
2k views

add_menu_page permissions - what am I doing wrong?

I am running a fresh install of Wordpress 3.3.2 and the only plugin enabled is one I'm developing, but I can't seem to get past a permissions issue in add_menu_page. With the exception of using ...
3
votes
1answer
959 views

How to add a sub menu with AJAX?

What i want to do is fire up the add_submenu_page() function from within ajax on my plugin options page. When i click an "Add League" link, i want to display an ajax input[text] that will save into ...
2
votes
1answer
891 views

difference between add_object_page and add_menu_page

According to Codex, the add_object_page "essentially does the exact same thing as add_menu_page() in case you're wondering". So.... what is the difference between those two functions?
0
votes
2answers
492 views

Add dashboard widget to page created with add_menu_page()?

I've created a standard page with a top level menu using add_menu_page() and I want to turn that page into a bespoke dashboard, ie to have a number of boxes like the dashboard widgets using something ...
0
votes
2answers
177 views

Seriously stuck with some custom meta box/plugin stuff

I’m working on a small plugin - part of it needs to add several meta boxes to all custom post types. I’ve tried looping through my array of custom port types in various ways but I keep getting errors ...
1
vote
1answer
530 views

add_submenu_page function to show videos table

wondering if its possible to show the attachments admin list for videos by using a custom menu link? Any pointers welcome! D. add_action('admin_menu', 'mt_add_pages'); function mt_add_pages() { ...
1
vote
4answers
1k views

How to prevent parent admin page from appearring as a child admin page

I am using this code: add_menu_page($page_title, $menu_title, $this->capability, $menu_slug, $function); Which is adding top level admin page. When I add: add_submenu_page( $menu_slug, 'sub ...