Add a top level menu page.

learn more… | top users | synonyms

0
votes
0answers
18 views

How to implement wp_localize_script with add_menu_page

I have a class Namer and this class adds a menu page (add_menu_page) and this in turn loads CSS and javscript, but I can't seem to load the wp_localize_script to do AJAX calls & Nonce, here is my ...
0
votes
1answer
27 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 ...
1
vote
1answer
14 views

add_page_menu to make shortcut to widgets

I want to make a menu button that takes me to wp-admin/widgets.php. The above code seems to work only partially. add_action( 'admin_menu', 'register_widgets_menu_button' ); function ...
0
votes
0answers
22 views

How do I get add_menu_page to use my custom PHP file to handle the display of the menu page content?

The reference page for add_menu_page indicates that this is possible by setting $menu_slug and omitting $function like so: add_action('admin_menu','register_my_custom_menu_page' ); function ...
1
vote
0answers
31 views

Admin Dashboard with Custom Tab for Client

I am trying to create a basic Tour Date widget. When the user clicks on the Tour Date Tab from the admin dashboard I want them to be presented with five fields. Date Venue City, State or Country ...
0
votes
1answer
15 views

How to add a menu page for options in wordpress for user that has the role of vendor?

I want to add new options page ONLY for those users whose role is vendor. How can I do that? This is my current code. add_action('admin_menu', 'business_settings_menu'); function ...
0
votes
0answers
24 views

Pagination in plugin's backend

I am displaying a list of posts in the plugin backend but I can't seem to get the pagination to work. I used the standard approach of getting the "paged" variable and then passing it to get_posts()'s ...
2
votes
1answer
83 views

Adding an admin page - OOP approach not working

I have a parent class, which contains the following: use app\My_Dashboard; class My_Class { public function __construct() { add_action('admin_menu', array($this, ...
0
votes
0answers
18 views

how to create page using add_menu_page?

how to create a new page in the administration menu, which will include (appearance -> header) and (Settings -> General) on one page?
0
votes
0answers
35 views

how to add a menu page with elements?

I have this example plugin for creating a page in the admin panel: add_action( 'admin_menu', 'register_my_custom_menu_page' ); function register_my_custom_menu_page(){ add_menu_page( 'custom ...
0
votes
1answer
39 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 ...
0
votes
0answers
17 views

Numeric values associated to admin menu bar

I'm customizing my admin left hand menu and am having an issue coming up with some of the numbers. I've even gone through the option of counting as I save out my code to confirm their sorting order ...
0
votes
0answers
44 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
102 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
25 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
179 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
360 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
143 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
28 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 ...
1
vote
1answer
855 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
224 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
65 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
187 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
2answers
3k 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 ...
1
vote
1answer
395 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
76 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
259 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
965 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
649 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
116 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
170 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
248 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
112 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
489 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
897 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
196 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
110 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
184 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 ...
33
votes
2answers
17k 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
153 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
361 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
956 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
568 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
442 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
35 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();