In this session we troubleshoot a page that is only displaying recent directory listings using the Directory Plugin rather than the entire listing. We find a workaround by using the shortcode from the plugin on a new page.
Member: The next bit is the directory. I moved the things around a bit. I’ve put basically 4 business names in there just so… it’s interesting. If you click on the business directory, I can’t work out how to get that to show the categories on that page rather than just the latest listing that I’ve entered.
Member: So that’s the first thing. Does this… you can find a shortcode in the directory plugin which is the one that’s come from WP MVU or whatever it is which worked for the business directory as you can see on the right hand side where I’ve got business directory and then it lists the categories. But it doesn’t work on the page and it said it’s supposed to work wherever you want to put the code.
Rick: Oh it will definitely work on the page. I’m going to make you the presenter and I’ll let you show me what you’re doing and I’ll show you how to make it work. So I’m going to make you the presenter. If it works in the text widget, it’s going to work in the page. The chances are that you put it in using the visual view rather than the HTML view or that there’s some little piece of funny code that’s keeping it from working right.
Rick: So just open it up…
Member: I’m on the page anyway now. That shows where I’ve put the code in and it looks exactly the same in both. This is the off of the listings page which we just viewed. If we go on to business directory after I’ve renamed it from the toolbar and it’s still listings up here and that’s how it displays even though that put in it. But it’s always seemed to be calling the information from somewhere because this isn’t overriding it.
Rick: Delete that entirely and hit update.
Member: And then if I just go back here and refresh it, it still puts the same information on.
Rick: Okay so by definition… it’s automatically putting this information in regardless of… in this page regardless of what you put in there. Go back to your dashboard and just type in “hello”. I bet you that hello doesn’t show up either. So what I think it’s doing is it’s replacing the contents… replacing… yeah. Hello doesn’t show up either.
Rick: So what’s happening is… go ahead.
Member: No so if this is the basic listings page which you’ll only find if I choose to do that, is there nothing… is there anything stopping me from just creating a different page called business directory, putting that code in there and using that as my main page for the listings?
Rick: I don’t believe there is so why don’t we… why don’t you just try putting that code in a different page? Let’s just look at some other page that you have for just a moment and let’s put that directory code in a different page.
Member: So I’ll just quickly add a new one and just call it directory. I don’t know where it was now… where that code was because I don’t…
Rick: Well, that code’s got to be…
Member: Oh there you go.
Rick: Let’s go look in the HTML view real quick. There you go, okay.
Member: Yeah, there you go. Put it in there instead.
Rick: Go ahead and publish and let’s look at it. This is directory. It’s the name of the page.
Member: There we go.
Member: That seems a simple way of solving it, isn’t it? And making that the drop down button with the menus underneath it instead of having the original listings page.
Rick: Yes. I mean, you could… because there’s probably a shortcode for adding listings in too and you can probably then just below that, below this shortcode, add another shortcode that would show the recent listings or something. But what’s happening here is this is essentially treating this like it’s a blog page for the post type listings. And so what it’s doing is simply displaying… it’s ignoring all of the content in that page then and simply displaying the listings and nothing else. So you just..
Member: Okay so I hope I’ll be able to use that as a way of getting around that first part.