Tagged Questions

Navigation Menu is a theme feature introduced with Version 3.0. WordPress includes an easy to use mechanism for introducing customised navigation menus into a theme. In order to incorporate menu support into your theme, you need to add a few code segments to your theme files.

learn more… | top users | synonyms (4)

1
vote
2answers
952 views

Minor css-change based on topmenu - how?

I want to make minor css-changes based on the choice of the top (root) menu. What's the proper way to handle this in WP? //edit// It's a website (pages), no blog, and basically, the colors of some ...
47
votes
3answers
52k views

Menu items description? Custom Walker for wp_nav_menu()

Normal Wordpress Menu looks like: Home | Blog | About us | Contact But I've seen many pages with descriptions under these links: Home Page | Our Blogs | About us | ...
0
votes
2answers
258 views

how to change menu titles

At the top of this website Wordpress answers is 6 menu items in the header Questions Tags Users Badges Unanswered Ask Question I need to change these on my website homesfriscotx.com ...
2
votes
1answer
319 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', ...
1
vote
2answers
401 views

Main menu - get rid of titles?

I've got a default main menu: wp_nav_menu(); But it gives a list of links in a form: (...) <a href="link" title="PageName">PageName</a> (...) The very important question is, how to ...
0
votes
2answers
836 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 ...
3
votes
2answers
7k views

Get the ID of the page a menu item links to?

I am currently using a custom walker to customize the output of wp_nav_menu(), and I am trying to add additional information to the <a> tags. What I want the output for each menu link to look ...
2
votes
3answers
2k views

wp_nav_menu always falls back to a menu

hey all, i'm writing an automated function that generates a menu from a function. it calls wp_nav_menu on each item from an array, because i want this to be dynamic. the problem is, no matter how i ...
1
vote
1answer
220 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
1answer
381 views

New wp menu menu styling

Ok ,i am not a great fan of the menu of WP, but now it manage this inside pretty ok, i have to make theme that use that menu. Now for styling i am a bit challenge... here is the problem... the menu ...
0
votes
3answers
933 views

WP navigation list classes

I'm using this code to display my menu: <?php $menu_args = array( 'container' => '', 'menu_class' => '', 'menu_id' => 'main-menu', ); ...
0
votes
2answers
1k views

Sitemap Page build from Menu?

Is there a plugin available that creates a sitemap from the default menu, e.g. as shortcode or requestbale URI?
1
vote
1answer
712 views

wp_nav_menu google analytics event tracking

I've got a WP3 custom menu, with a custom link in the menu, How can I add google analytics event tracking to that custom link. Thanks Alex
0
votes
2answers
1k views

confused about wp_list_pages() function - how to display selected top pages with all their subpages

I'm a bit confused about wp_list_pages() function. Lets say I have 3 top level pages (with no parent) and each of them have some sub-pages: page 1 [sub-pages: 1.1, 1.2, 1.3]; page 2 [sub-pages: ...
4
votes
3answers
7k views

wp_nav_menu remove class and id from li

I'm new to wordpress and trying to learn my way through from making a theme. Right now I am using wp_nav_menu to generate my menu My menu consists of pages and categories However, the default ...
0
votes
1answer
249 views

How can I fetch the next level of the currently selected main menu (hierarchical menu)?

I have the following structure (defined at Appearance > Menu): foo fii faa fee bar boo bee bii Now, in my theme I have one horizontal menu that shall always display foo | bar Below that, ...
0
votes
1answer
507 views

Using wp_list_pages() after calling query_posts()

It's possible that I'm just doing this wrong, so feel free to let me know how you would solve this problem. I have a mostly page-based site, but there are a few "pages" where my content is coming ...
0
votes
1answer
246 views

Is there a limit to number of pages displayed for selection in custom menu?

I recently started working with a client who has over 400 pages on their WP site (yes, pages, not posts). Their menu needs to be redone, so I decided to go the 'custom menus' route. However, not more ...
1
vote
1answer
1k views

Error “The given object ID is not that of a menu item” on menu with 40+ items

When ever I try to add menu items past about 40 I get an error "The given object ID is not that of a menu item" and many of my menu items will disappear from the menu at random. The site I am working ...
1
vote
3answers
887 views

Custom Menus: dynamic highlighting problem with custom home link

I'm currently implementing wp_nav_menu - all has gone well save for dynamic highlighting. The menu code looks like this (when home, which is a custom link, is selected): <div ...
1
vote
1answer
1k views

Dynamic sidebar nav with current page highlighting

My sidebar loops through all of the child pages based on the parent page. For example, if you're in the "About" section you'll only see "About" child pages in the sidebar. My problem is that I have ...
6
votes
3answers
7k views

How to add a Custom Link to a Menu with an URL that is relative to the blog URL

Part of my work is to create Wordpress websites. I usually work on my laptop until I have something good enough to be uploaded to the test server where the client reviews it. I create a VirtualHost ...
10
votes
1answer
17k views

How to add posts to custom menus?

I'm just beginning to work the "Custom Menu" functionality that was introduced in 3.0 into my theme. I like everything about this new capability and API, with one exception: Why no posts? I can ...
0
votes
2answers
105 views

if (has_custom_menu())?

I've taken this line from header.php of TwentyTen where its loading the custom menus... <?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu ...
1
vote
1answer
2k views

How to remove class attributes from custom menu markup?

Just playing around with adding "custom menu" support to my theme. I'm super excited about it. HOWEVER, Check this out > <ul id="menu-my-main-menu" class="menu"> <li id="menu-item-12" ...
0
votes
1answer
932 views

nav-menu-template and columns in sub menu

I am trying to use the wordpress menu setup and have a working horizontal menu with a drop down submenu. Unfortunately the sub enu is quite long so I wanted to split it into columns I can do it if I ...
1
vote
1answer
207 views

How to make link to different categories that in them selves loads different menus?

Im kinda a noob but have made some homepages for fun but got this new one that im making for a friend that´s stopped my dead in my tracks: http://yellowknife.se/artfex/ The popup (ugly as hell and ...
0
votes
1answer
642 views

Home page is getting current-menu-item even if it's not home

After upgrading to 3.1 I am seeing this issue. I use custom post types and when you click on the menu items either Games, Entertainment or Tech it gets the class current-menu-item but home link still ...
0
votes
1answer
632 views

creating a dynamic menu in wordpress

I'm trying to use the dynamic menu of wordpress! So I try to create an dropdown based on category, my question is... I need to block the first (title/category name) for being access .... right now it ...
0
votes
2answers
827 views

Global navigation in multisite: problem with categories

Setup: WordPress v 3.0.4, multisite network enabled, Theme: Twentyten child, local installation with MAMP 1.9.4, PHP 5.3.2, using SUBFOLDERS (not subdomains) for 4 sub sites Problem: Same global ...
10
votes
8answers
8k views

Adding custom post type archives to a WordPress menu

Is there a way (besides adding a Custom Link) to add a custom post type archive to a menu in WordPress? If it's added using a custom link (e.g. /cpt-archive-slug/), WordPress does not apply classes ...
2
votes
3answers
3k views

Using Shortcodes in WP-Menus in WP 3.1 (via nav_menu_objects)?

I've found this new plugin http://wpsmith.net/wordpress/creating-multiple-custom-menus-in-wordpress-3-1 that is using a new 3.1 hook (wp_nav_menu_objects) to remove specific nav-menu-items from the ...
1
vote
2answers
817 views

How do I add (css) class to a custom link to make it current_page_item

As a custom menu item wp doesn't add the class current_page_item All other links it does? <ul class="nav" id="menu-mainmenu"><li class="menu-item menu-item-type-custom menu-item-home ...
0
votes
1answer
743 views

Ordering Submenu Pages in WP 3.1

I just recently upgraded to WordPress 3.1 a few moments ago. However, I noticed that when you have Post Types show up under a *main* menu page, it overrides the link fo th menu link. Here's my ...
1
vote
1answer
2k views

Find out if a page has no parent

Hay, have a basic menu looking like this Item 1 Item 1.1 Item 1.1.1 Item 1.1.2 Item 1.2 Item 2 Item 2.1 I'm outputting this as a list using WordPresses "wp_list_pages()" ...
1
vote
2answers
318 views

Can only get one of two custom menus to display

I'm a wordpress beginner and at the moment struggling to get to grips with custom menus. I have created two menus. Wordpress tells me the theme supports two menus. I have <?php ...
3
votes
2answers
4k views

Navigation menu with children shown only for current page

I've been playing around with Wordpress' menu functionality (wp_nav_menu and wp_list_pages) to build a menu for my site. It's coming along, but I'm still having some trouble getting the behaviour I'd ...
5
votes
4answers
9k views

Add Class to Specific Link in Custom Menu

I know you can add a class in the custom menu options, but it adds it to the LI before the A. I want to apply the class directly to this specific A rather then the whole LI. So instead of the output ...
0
votes
1answer
418 views

Is there a way to tell menu items to force non-SSL URLs?

I've got a client site which uses SSL for only a small chunk of pages where users purchase subscriptions. So, for those pages, we just make sure that any links into them have hrefs with https://etc ...
1
vote
3answers
2k views

removing <li> tags from wp_list_pages() using PHP

as the title states, I am trying to remove the <li></li> tags from the list that gets generated with wp_list_pages(). My thinking is to somehow run a for/foreach loop through the menu ...
0
votes
1answer
307 views

Wordpress menu: How to make www.link.com/#name never contain current_page_item class?

I am using the wordpress menus on a website, but the problem is that one of the links on that menu is www.homepage.com/#order So, when I am on the homepage, both "home" and "order" links on the menu ...
3
votes
3answers
8k views

Using Image Links in Wordpress Navigation Menus Instead Of Text Links

Does wordpress support the capability to use images in the navigation menus instead of text links? I searched for this capability and found a site that shows how to include images in the menu through ...
2
votes
3answers
6k views

Hide Admin menus per role in Wordpress

I am trying to hide a certain amount of menus for a client. Right now I am using the following code and it is doing its job well, but it removes it for everyone as far as I can tell. As in all roles. ...
0
votes
1answer
801 views

Is it still not possible to show separate submenu with “Custom Menu”?

Well, the title says it all. Is it still not possible to show separate submenu with the "WP Custom Menu"?
0
votes
2answers
1k views

Including link to custom post type in 'wp_list_pages' function

I am generating a navigation menu on my website using the wp_list_pages() function and I also am using a couple of custom post types with a post type archive function. How would I go about adding a ...
0
votes
1answer
910 views

Child pages don't become submenus (as in the twenty-ten theme)?

I'm using the theme Starkers which is based on twentyten. My twenty ten theme do place child pages below its parent page. But the new theme (based on Starkers) I'm developing doesn't (it just place ...
1
vote
2answers
438 views

How to set my main menu items

I am new to WordPress development, hope this is not a too stupid question. How can I setup my Menu such that it has links to Home About (Page) Blog (I think posts in all categories except Portfolio ...
5
votes
2answers
2k views

Custom Post Type Menus

I'm writing a plugin for work because our main website is being ported to WordPress eventually. I've got multiple custom post types planned for this plugin and would like to group them all into one ...
1
vote
2answers
2k views

Manage custom menu for an Editor?

I've a problem with permission. Is there a specific permission to let an user with Editor Role, manage the custom menu of a theme, and only this options? The item that is under Appereance -> Menu, to ...
2
votes
2answers
567 views

How to manually add an item to a submenu in a menu generated by wp_nav_menu?

Hey. I've been trying to figure this out for a long time but can't seem to crack it. I have created a menu using Wordpress 3 menu editor and it's all fine and working. But I want to manually add an ...