In this session we discuss when to use a widget instead of a menu. Menus in WordPress are designed to display horizontally but can be made to display vertically by adding some CSS. In this case, someone wants to create a vertical menu list but doesn’t want to use CSS. We talk about the different WordPress widgets that will do the job such as the links, page and categories widgets which are all intended to display vertical lists.
Member: Now I’ve got two… I’ve actually got two issues. The first one, I don’t know if you could see on the sidebar, you see check out all categories?
Member: I’ve got hydroponic system and then hydroponic systems should have been right underneath it but it’s not.
Rick: And what is this… what widget are you using for doing that?
Member: Oh, it’s just the… it’s actually a… it’s just a menu, a WordPress menu.
Rick: Yup. And so the reason is that… are these actual categories?
Rick: You probably be better off simply using the category widget instead of the Nav Menu widget. You could add some custom CSS to make this nav menu vertical. But what’s really happening here is this is just a standard horizontal navigation menu that it fills the space and then once there’s not enough room for it to continue, it drops down. You could make this into a vertical navigation menu if that’s really what you want to do. But the easiest thing to do would be to simply use the category widget because the category widget just makes individual line items.
Member: Okay so just category widget would do it?
Rick: As long as these are categories, yes.
Member: Yes, they are. If you go down to the footer area, it’s the same thing. Well, like I put a category there as well and this one actually, I kind of play with CSS a little bit with the one on top, the one I just showed you.
Member: This one, this is exactly what was when I first set it up and then by playing with CSS, I end up with what you just saw on top there. But this one like I haven’t played with it yet and I was just wondering if there was an easier way without necessarily using a plugin just to make it look like everything else.
Rick: Yeah, the easiest way in this case would be… well, you could do a couple of things. You could either use the links widget and you could configure a link category you know, called… I mean, what would the name of this thing be?
Member: This one here?
Member: The one at the bottom there?
Rick: Well, the important pages or something like that, right? You’ve got more categories, recent posts. You could have important pages or something like that.
Rick: And then you could do one of two things. You could either use the Pages widget and then just put the page ids in for each of the ones that you want on the list.
Rick: Or you could use the Links widget and you could create bookmark links for those pages. Then the Nav Menu, it’s got the nice drag and drop feature, the Nav Menu itself is not really designed for this task. The Nav Menu style is set up to automatically be horizontal and what you really want is a vertical list of stuff. Well, WordPress has a number of things that are designed to display vertical lists and the bookmarks widget, the page widget and the categories widget are all intended to display vertical lists like you want.
Rick: And so…
Member: Okay, I didn’t…
Rick: And so if you use the Pages widget, the Pages widget, you can just you know, tell it which pages you want to show up by entering their page ids.
Rick: And then it needs no special styling then because it will automatically style itself that way.
Member: Okay so that’s for that and that was my question number 1, thank you.