Tagged Questions
0
votes
1answer
12 views
Redirect url in plugin to somewhere else?
I am using WP-SNAP Extended! v1.0.0 and I want to use this alphabetical menu as a sub-menu beneath my header. I managed to get the alphabetical menu in place, but now, if I click on a letter, it will ...
0
votes
0answers
15 views
How to access menu items object from within plugin?
how to access menu items object from within plugin? When I try to use wp_get_nav_menu_items() I get : Fatal error: Call to a member function get_page_permastruct()
0
votes
1answer
41 views
Can't remove menu items added by plugin
I am trying to remove menu items from the backend but for some reason I can't remove specific menu items added by plugins. For example, I can use this line to remove the plugins page and it works just ...
4
votes
1answer
124 views
Nav Menu meta failing to import
I'm the author of the Nav Menu Roles plugin that lets you display/hide menu items based on the user's role. It has come to my attention that the menu item meta does not import when using the regular ...
2
votes
3answers
261 views
Change the_title() of a page dynamically
I'm developing a plugin that doesn't use a custom post type, but separate database tables.
It's a plugin that displays a list of courses with links that lead to the different course detail pages, ...
2
votes
0answers
47 views
How do I approach removing menu items on the fly based on settings in my plugin?
I've started writing a plugin that allows the administrator to select specific pages and set them to be visible only to logged-in users; the plugin optionally applies the restriction to all child ...
0
votes
1answer
60 views
Create and style menu
I have been assigned with the task to create a menu that can be added or removed from wordpress admin. Right now the menu is hard coded into the templates. But I want to use default menu function ...
1
vote
1answer
415 views
How to add sub-menu to a menu generated by wp_nav_menu by using plugin
I have a menu generated by wp_nav_menu which look like
<ul class="nav-menu" id="menu-top-nav">
<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-43" ...
0
votes
1answer
77 views
Delete a specific item menu when I deactivate my plugin (resolved)
When I activate my plugin (register_activation_hook), I add a new specific page and a corresponding item menu in the custom menu. No problem here.
When I deactivate my plugin ...
12
votes
1answer
996 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 ...
2
votes
1answer
161 views
Add Submenu Link in add_submenu_page That Opens in a New Window
How can I add a sub menu link using add_submenu_page that will open a new window (target="_blank") instead of opening in the current one (default behavior)?
0
votes
1answer
191 views
Change the class of wordpress menu
I have problems with wordpress menu level classes.
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
this is the code i used to generate my menu,
First level menu id is
...
1
vote
1answer
163 views
Plugin menu addition in multisite
$wp_admin_bar->add_menu( array(
'parent' => $menu_id,
'id' => $menu_id . '-example',
'title' => __( 'Example Menu Item', 'example' ),
...
0
votes
1answer
88 views
How do i specify a url to which to redirect the user after he logs out from facebook?
I need to specify a url that i will use after the user has logged out from facebook because i need to do some extra-cleaning and he is correctly logged out from our app.
For this i need a url that ...
0
votes
1answer
308 views
wordpress add_submenu_page adds broken link
I install my plugin in several sites and the submenu links generation at backed works fine, but fails in one specific site.
I use the follow code to add the submenu items:
add_menu_page(
'Plugin ...
3
votes
3answers
1k views
Nav menu separators?
Anyone know of a plugin that can, or have an idea how to, allow a user to drop in separators/dividers between certain nav menu items?
Google only seems to bring up rookie CSS tips for first/last ...
0
votes
2answers
1k views
Add section (add_settings_section) to a custom page (add_submenu_page)
I have a plugin page created with add_submenu_page. I want to add a new section there but nothing happens:
add_submenu_page('parent', 'Foo', 'Foo', 'manage_options', 'foo-settings', ...
-2
votes
3answers
157 views
Plugin: Custom menu item problem
I'm using the following snippet to add a menu item:
<?php
add_menu_page(
'Foo Server',
'Foo Server',
'manage_options',
'foo-server',
array('Class', 'method')
);
?>
Fine, ...
1
vote
1answer
348 views
How do I access the menus produced by Dashboard > Appearance > Menus
A continuation to this question:
Replacing WordPress menu functionality with a plugin
Since I really rarely work with WordPress (I've done a lot of work with phpBB, myBB, Concrete5, and custom PHP ...
1
vote
1answer
198 views
Replacing WordPress menu functionality with a plugin
I asked this earlier on StackOverflow.com before realizing there was a StackExchange specifically for WordPress. Here is the link to the old question (for moderator deletion):
...
0
votes
1answer
142 views
I cannot include a file in my plugin settings page
I'm trying to create a settings page. If I print things within index, I can see it. If I try to include it, I can't see anything, neither errors.
add_options_page('My Plugin', 'My Plugin', ...
0
votes
1answer
113 views
Why isn't the Settings API designed to work for plugins using custom admin menus? [duplicate]
Possible Duplicate:
How should one implement add_settings_error on custom menu pages?
The Settings API offers all sorts of labour saving features and future proof code. I find it really odd ...
0
votes
1answer
121 views
Add user managable titles to custom menus?
I am looking for a way to include a user managable title in a menu. Ideally, it will take the place of the first <li> object in the output.
Any ideas?
Edit Clarification
I am looking for a ...
0
votes
2answers
140 views
styling mega menu [closed]
I am newbie to wordpress. In wordpress I have made a menu using mega menu plugin. But my requirment is to make a menu with different color in different tabs. Just like this site menu
so tell me how ...
0
votes
1answer
530 views
Menu page with minimum capability as 'Subscriber' doesn't allow 'Admin' to access it?
I've added a separate menu page (an object page) with minimum access level required as 'Subscriber'. I'm doing this because I'm registering new users and they'll be 'Subscribers' with an extra ...
2
votes
1answer
262 views
How to assign a WP 3.0 custom nav menu to a theme's navigation menu location via script?
I'm using this script inside a plugin to create a new custom menu on the fly and assign a page to it...
$menu_id = wp_create_nav_menu( 'header-menu' );
$menu = array( 'menu-item-type' => 'custom', ...
0
votes
2answers
647 views
How to add pages to custom menus on the fly [duplicate]
Possible Duplicate:
Can I add pages to my custom menu via script?
My theme has a custom menu called "Custom Header Menu" and i've got a plugin that sets up site defaults and creates my ...
1
vote
1answer
176 views
Can I add pages to my custom menu via script?
My theme has a custom menu assignment...
function my_register_my_menus() {
register_nav_menus(
array('header-menu' => __( 'Custom Header Menu' ) )
);
}
...and I'm creating an "installer" ...
0
votes
2answers
2k views
WPML Plugin Not displaying multilingual Menus
I'm using WordPress 3.0 Menus, which the WPML (wordpress multilingual) plugin claims to have added support for in a recent release. I am using the most current version of the plugin.
My problem is ...
0
votes
1answer
466 views
How do I add a custom sublevel menu specified in one directory to a custom top level menu specified in another directory?
I'm working on a plugin that constructs a top level menu and resides within its own directory in /wp-content/plugins.
For example, the plugin looks like this:
function main_menu() {
...
3
votes
2answers
646 views
Overwriting Core Wordpress Functions with Plugins
Is there a way to overwrite a core function is the Wordpress core using a plugin? I don't need to inject code, I need to replace the function entirely with a re-written version.
The specific function ...

