0
votes
1answer
15 views

WP_NAV_MENU filter targets all menus

Im trying to replace my template's primary menu through a plugin so that I don't have to make changes to the header.php. I found this code in another question answered here in 2011 (Replacing ...
0
votes
0answers
27 views

Duplicate WP3.0 menu php files?

He's my problem: I want to have a single page that a WP-admin can build by including different parts of the site by choosing posts. (I know the admin could add these posts to a category and then ...
0
votes
1answer
27 views

How can I pass value to function in add_menu_page?

I was use to pass value to function for the below menu. add_menu_page('Competition Manager 2013-2014', '2013-2014', 'manage_options', 'manager_2013_2014', 'manager_2013_2014', plugins_url( ...
1
vote
0answers
53 views

Custom code for WordPress dynamic menu

Without using plugins, how can I create a custom WordPress navigation menu to produce the following code? <div class="bottom_section_full"> <div class="bottom_section_left ...
1
vote
1answer
52 views

Create a Page via plugin

My problem is to show a list of products read from db tables. I know how to read them and I am able to produce the table, but only using a shortcode embedded in a page that I've created via WP. I ...
0
votes
0answers
265 views

Custom Taxonomy Showing in WP Menu

I have 3 taxonomies bundled with my custom post type. I have noticed my custom post type(cpt) and 2 taxonomies won't show in the Wordpress menu system but 1 taxonomy will. Can anyone point me in the ...
0
votes
2answers
305 views

How do I programatically insert a new menu item?

I'm developing a plugin and I want to insert menu items programmatically. When my theme creates a menu, it uses this call: wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => ...
0
votes
0answers
25 views

Highlite current menu page problem

Hello I have a problem with the wordpress menu I have the main menu parent item has the same link width first page in submenu Parent --- Haloterapie: www.site.com/halorepaie Submenu --- Actiunea ...
0
votes
0answers
43 views

WordPress Menu Targeting

Okay so I'm building out a plugin that generates a list from the $menu and possibly $submenu. I want to loop through that array and generate that list by the menu_slug, but I cannot seem to figure out ...
0
votes
1answer
279 views

Plugin admin list pages as submenu

I am creating a plugin for a custom admin menu based in the admin area. My wordpress template is consisted of 5 pages with different templates and some custom variables that the end user would be ...
1
vote
1answer
105 views

How use %like% in sql statement wordpress

i use a like %text% statement in wordpress: SELECT * FROM location WHERE name LIKE "%on" OR name LIKE "%on%" i tried anything but it's not run: $wpdb->get_results($wpdb -> prepare("SELECT ...
3
votes
1answer
231 views

Determine which theme location a wp_get_nav_menu_items is for

Is there a way to determine which theme placement a menu is for when modifying it with the wp_get_nav_menu_items filter hook? I'd like to only add items to certain menus and I don't want to have to ...
0
votes
1answer
107 views

Adding parent custom post type menu option

random problem for me here. I have several custom post types registered to Wordpress and I want to add the archive pages to the menu, but I do not want them to be static links. Is there any way to ...
0
votes
1answer
184 views

How do I add a menu item to a Pods admin menu?

I'm writing a plugin that will send a notification message to an external queue whenever a menu item is clicked. This function is related to some customized data structures I made using the Pods ...
0
votes
1answer
50 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
1answer
84 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
359 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 ...
3
votes
3answers
2k 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
1answer
164 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
65 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 ...
6
votes
1answer
2k 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
105 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 ...
18
votes
2answers
5k 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
341 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
539 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
196 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
106 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
503 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
2k 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
2k 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
179 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
446 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
413 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
164 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
125 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
142 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
1answer
965 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
306 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
798 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
210 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
595 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
869 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 ...