Sometimes you may want the top level menu item of your navigation bar not to link off to anything. This member wanted to be able to hover over the menu item, have the submenu items drop down, but not actually have a page named for the top level menu item. By default the Thesis Navigation Menu doesn’t allow that, however the WordPress 3.0 menus do allow it. In this video I show how to substitute the default Thesis Navigation Menu for a WordPress 3.0 menu and then make one of the top level items link to the current page, no matter what page you happen to be on.
Select the link below to watch a high definition version of this video
[S3VIDEO file=’public/liveanswers/LA12-06-10a-top-level-menu-item-that-is-not-a-link.mp4′ bgimage=’https://www.byobwebsite.com/wp-content/uploads/2012/09/LA12-06-10a-top-level-menu-item-that-is-not-a-link.jpg’ displaymode=’overlay’]
I’d like to just jump on to the question we answered Saturday about how to make this tab up here not go any place but stay on the same place and only let the drop down elements go places. And so I demonstrated that here on this website which is www.categories.byobwebsite.com which is a site that I use for demonstrating answers to questions that I’ve given mostly on the DIY themes forum.
So we’re just going to come over here to the WP Admin and log in to this. And the way we do that is by using the WordPress 3.0 menu system. The WordPress 3.0 menu system allowed or is made possible outright in Thesis 1.8 if we’re using a version of Thesis that is not Thesis 1.8 then this is not going to work. But first we’ll start off by coming over here to Thesis site options and under this navigation menu, what we’re going to do is, we’re going to select the menu type. Right now, I have the thesis admin you selected but what we’ll do instead of that is press the WordPress nav menu and hit save.
And now you can see all the regular navigation. Our menu options have gone away because we’re going to use the WordPress nav menu instead. And so, what you do is you scroll down here to appearance and menus and we’re just going to create a new menu so we’ll enter the menu name here, in this case, we’ll just call it Main Menu and we’ll create the menu. And then what we’ll do is we’ll add some pages to the main menu, we’ll add carousel and how did this… demo 7 and mommy blogger and I think we’ll go to Home and we’ll add those to the menu. And then you can see that these things are all stuck on here in the order that I’ve selected them. You can grab a menu item and drag it to the top and if we go ahead and save this menu now, what’s going to happen is the first tab will be home, 2nd tab will be carousel, 3rd tab will be demo 7 and then mommy blogger.
Now the other thing we have to do is we have to select the primary menu. We only have one menu so we’ll select main menu and hit save. We’ll hit save menu one more time just to make sure it happens and then we’ll jump on over and take a look at our site. Okay, this is one of the really cool features of WordPress 3.1 which is working in its Beta version on this site. And it essentially gives you all of your edit functions for administrators up here on the top. Nobody else but the administrator is going to see this so this view shows up when you are logged in.
And now you can see that we have these different tabs set up as we laid them out in the menu. Now this is obviously way too long and Thesis had this neat little way of changing the size. WordPress does also. We come back over to our menu and drop that down. We can change this menu label say, just to demo 7 and it’ll keep that original name just that so you remember specifically which one you were using but if we hit ‘save menu now’ and we come back over to this and refresh it, now you can see we have a nice short name.
You know, that actually hasn’t answered Brian’s question because what Brian wants to do is when he clicks on this not go that page, he doesn’t want this to link to anything. So in order for us to accomplish that, we come back over to our menu and the first thing we’re going to do is we’re going to create a new menu or we’re going to use these custom links.
So the HTML standard for linking to the same page that you’re on is the pound sign. So instead of this URL, we’re just going to put the pound sign here and then the label, we’re going to say, we’ll just call it categories and we will add that to the menu. Now, as it turns out, obviously, there’s nothing below this right now and so we want to put some child pages under this parent page or parent menu item. So we’re going to take cherries, bananas, and oranges and we’re going to add them to the menu. And now if we just save this menu right now, come back over and look at it, you can see these are all on the same level and if we click categories, nothing happens because it just links to this current page.
What we’ll do is, we will take these sub… what we want to be submenu items, and we just shift them over here under the categories thing, and as we drag and drop them, now they are submenus of categories. We can hit save again, come back over here and refresh it. And now categories doesn’t take you anywhere but oranges take you some place. Bananas does. Categories leaves you on whatever page you happen to be on so right now, if we click on categories, it stays on the bananas page, if we click over here on demo 7 and click on categories, it leaves us on the demo 7 page and so on and so forth. So now we’ve answered Brian’s question about how to keep this so that it shows as a top level link but does not go anywhere. Did that fully answer your question, Brian?
Brian: Yes it did, Rick.