The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
37 views

What is the callback sent to add_submenu_page() invoked by WordPress?

WordPress tries to be event driven with all it's actions and filters you can hook to. But it also has special functions to create admin pages such as add_submenu_page() which accepts a (callback) ...
0
votes
2answers
100 views

add_submenu_page() link missing 'admin.php?' prefix

I have two plugins - one is the "primary" plugin called "SmartPost" and I'm trying to extend it with another plugin called "SmartPost E-mails". So, in other words, "SmartPost E-mails" extends and ...
0
votes
1answer
16 views

Post to type posts in subdirectory. [closed]

I would like to do the following: I have a blog with my domain www.examplesite.com and got some posts on it. But I would like to move some of the posts into a subdirectory www.examplesite.com/extras. ...
0
votes
1answer
23 views

Sub Menu content is being duplicated

In the plugin I am developing I am using the following code to build my menu - add_menu_page('BCRM Plugin Settings', 'BCRM', 'administrator', __FILE__, 'bcrm_settings_page', BOOGIE__PLUGIN_URL . ...
0
votes
0answers
25 views

Why is the Page Title missing on Pages added with add_submenu_page?

Adding sub menus is easy with add_submenu_page and is working fine as long if you define a $parent_slug: add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function ...
0
votes
1answer
48 views

Redirect loop when forwarding to mobile site

I have successfully redirected my page to m.example.com from example.com when i open in mobile environment with this code in functions.php add_action('template_redirect', ...
0
votes
1answer
70 views

Add a Submenu from Another Submenu in a Custom Theme

Good day everyone! I would like some help from you since I'm just a beginner in WordPress. I would like to add a submenu under another submenu like this: International China Independent Group ...
0
votes
1answer
83 views

edit-tags.php in plugin admin menu hides when is the active page

For the plugin I'm building I have added a submenu as a child to a custom main menu item in admin. The submenu page is an edit-tags.php page. This shows up as intended under the main menu item. When ...
1
vote
1answer
27 views

Howto check version of another plugin and then add a submenu page to it

i'm writing a plugin which requires another plugin. So i have to check first if the other plugin exists in a correct version. If yes i want to add a submenu page to the plugin page but here my code ...
0
votes
0answers
31 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
266 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 ...
1
vote
0answers
95 views

Add new button to WP backend menu

I can add a new link under the dashboard menu in the backend of WP function new_link_display() { echo "Echo html code for the page"; } function new_link_page() { if ...
0
votes
2answers
137 views

Create dynamic wordrpess blank page

I've created a submenu in wordpress using add_submenu_page: add_submenu_page(null,'Page Title','Page Title','administrator','page-slug','page-callback'); I want to create another page like this ...
0
votes
1answer
164 views

Adding title and description to subpage's featured image

Hej! I have a subpage to display it's subpage featured image. I would like to add the title and description to beneath the thumbnail. Today my code look like this > In the functions.php function ...
0
votes
1answer
79 views

Odd behaviour with submenu link creation

I'm trying to develop a plugin that needs to add two pages to the dashboard side-bar menu. One of these being a main category. Everything is fine, except for the second submenu item for the settings ...
0
votes
0answers
97 views

Who to echo custom post type on submenu page

i have custom post type and i want to echo the content of it in submenu page like these <?php function codex_custom_init() { $labels = array( 'name' => 'Books', ...
1
vote
1answer
225 views

Admin Panel - Custom Menu Sub-Item LINK

I'm trying to add a custom link under my Post Type in my admin menu, which will link to Pending Posts. This code functions, but it instead makes a page (like I suppose the function should), but I just ...
0
votes
0answers
92 views

Set permissions to view custom admin pages by Role, not Capability

When using add_submenu_page(), Is there a way of specifying a Role instead of a Capability? I have added a menu to the WP admin area which has 4x sub-menu pages. The level of access to three of these ...
0
votes
1answer
251 views

add_sub_menu page() to be replaced by add_theme_page()

While checking my theme with theme-check plugin, i found few errors which are listed below along with the line of codes where it displays those errors(REQUIRED:) to be fixed. REQUIRED: ...
0
votes
1answer
106 views

TGM plugin error in Theme Check Plugin

Errors generated by theme-check plugin and with the code REQUIRED: plugin-activation.php. Themes should use add_theme_page() for adding admin pages. Line 335: add_submenu_page( add_submenu_page( ...
0
votes
1answer
131 views

Custom post type submenu sorted by specific meta_key & meta_value

I have a created a custom post type called "Events" using register_post_type. I am now trying to create a submenu within "Events" that will only show events sorted by a specific meta_key and ...
2
votes
1answer
640 views

add_submenu_page set for multiple roles [duplicate]

I have this string: add_submenu_page(basename(__file__), 'Events', 'Colloqui', 'subscriber', 'BW_events', 'BW_events'); How can I let this be available to editor(s) too? I tried ... ...
0
votes
1answer
135 views

How to add more than 1 user role to sub-menu pages

I create a plugin with 6 submenu pages. I need 4 of them to be accessible by administrator and a custom user role i created say 'coach' user. Then the 2 of them to be accessible by administrator and ...
6
votes
1answer
341 views

Check if add_menu_page exists or not

I'm working on a plugin that I have to release in parts. The problem is, if there is a menu in the page then add the new plugin to the 2nd or next submenu else add a new menu and then add the plugin ...
0
votes
1answer
233 views

Wrong current class on admin menu with add_submenu_page()

I'm writing a plugin that displays a post/page list in the admin menu, as a submenu for each post type. Here's the code I've got far: http://pastebin.com/DmUGfzxN The lists are showing and linking ...
0
votes
2answers
961 views

How to create sub menu with a URL parameter?

I would like to add parameter for the submenus, but when I click to the admin page I receive the following message: You do not have sufficient permissions to access this page. Code: ...
0
votes
1answer
27 views

Pricing Tables admin page capability

I'm creating a plugin that will allow to create Pricing Tables in a fast and easy way. But, I'm not sure what rule to use for capability. What would you use? Right now I'm using edit_pages: ...
0
votes
1answer
349 views

Adding querystring variable breaks admin URLs

I've set up some admin pages using add_sub_menu() and whenever I add an additional querystring variable beyond the "page=" portion of the URL, I get a "Cannot load 'page-slug'." message. When I ...
0
votes
2answers
727 views

How to add a child item to a menu element (using wp_nav_menu_objects)

(1) I used the code given on answer to How to use logout function on custom menu link? to programmatically add a menu element to wp_nav_menu_objects (Say "Animals"). I give it an id, say 1000. (2) ...
0
votes
4answers
2k views

Add menu and submenu in admin with a URL instead of slug?

I use this function and hook: function mysite_admin_menu() { add_menu_page( 'Categories', 'Catégories', 'administrator', 'categories', 'a_function' ); add_submenu_page( 'categories', 'Manage', ...
0
votes
1answer
171 views

Prevent Admin gui output from page added using add_submenu_page

I have created a download link for my plugin using add_submenu_page. When the link is clicked it gathers some files into a zip, then outputs the contents to the browser like so: header('Content-Type: ...
3
votes
1answer
322 views

How to link a Custom Post Type submenu to a Nextgen Gallery page?

I've created a custom posts top level menu item but I would like to have a submenu under that linking to the Add Gallery page of Nextgen, as the client wants all their functionality bundled up under ...
0
votes
1answer
721 views

Add an admin page, but don't show it on the admin menu

I have a custom plugin 'Charts' that has it's own menu. In that menu are links to the 3 pages for the plugin - 'Charts', 'Add Chart' and 'Edit Chart'. However, I don't want to display the link to ...
1
vote
1answer
2k views

Hooking into add_submenu_page

Ever come across a plugin that is using the manage_options capability for a page that... really doesn't need to be? Well, I've come across just that. This may be more of a general question about ...
2
votes
2answers
981 views

add_submenu_page callback a file instead of a function?

I want to clean up my theme options because I can't keep track of everything. How can I get my page_callback to link to a file sintead of a callback? I know that I could include the file in the ...
0
votes
3answers
696 views

Change top level menu item to point to custom submenu item

I'm using a plugin called CMS Page Order http://wordpress.org/extend/plugins/cms-page-order/ (Now referred to as CPO) It's pretty simple, the said plugin adds a new item to the submenu of every ...
20
votes
2answers
8k 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 ...
4
votes
1answer
1k views

Plugin - create a page without it appearing in the side menu

I am currently using add_submenu_page to add pages for my plugin. However, I wish to create a page that don't appear in the admin menu, is that possible?
0
votes
2answers
4k views

How to Add a Sub Menu Page to a Custom Post Type?

I am trying to create a link under a custom post type I have named "portfolios". If I change "add_submenu_page" to "add_options_page" it correctly shows a new link under the "Settings" menu. But it ...