In this session, we discuss what to consider when deciding to use posts or pages for your products in your WP eStore. Some of the variables are the number of products, hierarchy system to be used and how you want to categorize them. In general, pages are easier to use when you have just a few products and posts are better suited for a large number of products.
Okay so let’s go ahead and dive into it then. When you asked a question about posts or pages for the products?
Yeah when I was going to go through one of the tutorials in create a product post, you created a product post page as opposed to a product page. And so, I guess the question was when I did that now, when I hit blog, the first gif goes to blog but the product page comes up because that’s what I put into post as opposed to a product.
And so, I was trying to figure out how do we make sure that those products don’t pop up but posts in a forum entry…
What is the issue there?
Well obviously, you have 2 choices – to use either a blog post, a post or page as a product. And in the eCommerce series and you know, How to Build an eCommerce Website series that we have on the site, I teach how to use posts as products. And so, each post is its own product and then we put the Buy Now buttons and all that kind of stuff on the post itself. And then ultimately, if we’re going to use the blog for blogging as well, what we do is we put the posts in a category called products and then we exclude that category from displaying in the blog. So the product posts don’t show up the blog.
In the course I’m teaching on Monday, we’re using Pages for that purpose. And mostly because I wanted to sort of sidestep the confusion about that but what was your question further?
My question is okay, how do I exclude the… now that I’m using post forum products, how do I exclude them or in going to that, how do I exclude those from the blog?
Sure. Now since we’re still early in the process of developing this site, let’s take a step back and ask, why would we use posts or pages for this? And the reason why I suggested using posts in the eCommerce lessons was the assumption is that there are lots of products, lots of individual products. And that we were going to use the Thesis and the WordPress system for displaying posts by category or by tag as a means of searching, sorting, and displaying products.
If you’ve got 10 products or 5 products you know, it probably makes sense to do them as pages instead especially if it’s in the context of like what we’re talking about on Monday where you have a class or you have a course and you’re going to have a different you know, page for each lesson and you’ve got a page as your product. That probably… it probably makes more sense to do that as pages rather than posts.
So the distinction here is really, is there a hierarchy in… well, it’s quantity. Do you have just a few or do you have a whole bunch? And then it’s a question of hierarchy. There is no hierarchy in posts so you’re going to use a category for hierarchy. So if you had you know, how to raise tomatoes as a course you were teaching and you know, Lesson 1 is how to pick the right tomato plant and then Lesson 2 is you know, planning your first tomato, each of those lessons, if they’re pages then they can be subpages of the main product page which is how to grow tomatoes. If they are posts, if the product is a post then it may very well be the case that you want each of the… what are subpages that they are pages to be posts as well, each lesson is a post. And then you have to categorize your products so that you’ve got a tomato, how to grow tomatoes as one category and then lessons… and so then all of the lessons associated with that have to be categorized that way.
You know, I feel like I’m not really explaining that very well here at the moment. So why don’t you describe what it is you want to do?
Well, I’m not sure we got… both of your tutorials are the things that I want. I want a website that allows me to sell a lot of products and I want… the tutorial on your site… built there, different kinds as well. I want a membership site for this that sells courses. So what I think about now is catalog style and if I can post products then it’s good to go.
Perfect. Well then there is a… can you see my screen? Okay so if you search for exclude category from blog… if you do a little search, you will find some code here at the top on… that’s the forum one. Here’s the link, I’m sorry, my mistake. You will find some code here that I use on my site actually for excluding categories from the blog itself. And it’s relatively… have you started doing any custom PHP work yet?
Okay so then you would just copy this code and the trick here is getting the category id in here, right? And this expression, category not in, if you just put the parent category in… say it’s products. So your category, your parent category is products. If you put that one in and everything else is categorized under products, just putting in the product category id will exclude all of its children.
And so you know, essentially, the function is you know, if is home and then you’re going to change the query post so that it says category not in and then with array and then just the number of the product category. And when you’ve done that, it will exclude all of that category subcategories.
Okay and that’s… you know, that’s how I do it on this site as well because I don’t have a products category but all of my videos are actually posts. And so… and they’re all very thoroughly categorized starting off with the category called Video Tutorials. So all I have to do is exclude my Video Tutorial category and all the rest of the videos in there are excluded from blog which is why when you go to the blog page, you don’t see a whole ton of videos you know, filling up the blog itself. Does that make sense?