This question is not about a plugin problem or how to achieve something with WordPress on a coding-level rather I would like to have
some advice on how to structure a WordPress site with the following content;
- 3 products wich need to be showcased (e.g. a, b and c). Each product has the same type of content; a short description and
multiple images per product
- Some static pages (no problem)
- A BLOG area; this will use most of WordPress default functionaly; archives, search etc. It is important that the blog is seperated from the product content. E.g. products
must not show up in archives in blog etc.
I ran into this a couple of times and now I need advice on how to set this up the right way from a experienced WP developer which has experience
in developing enterprise-grade sites running on WordPress. Any ideas?
Pippin Williamson answers:
For the products, I would use wp-Ecommerce. [[LINK href="http://getshopped.org/"]]http://getshopped.org/[[/LINK]]. It is a tremendous plugin that I have used on quite a few ecommerce sites. It gives you all the capabilities you could need: categories, product thumbnails, grid/list view, and a whole lot more.
The plugin is free with premium upgrade options to add extra functionality.
You could also set the products up using 3.0 custom posts, but it would take a lot more work.
jedw comments:
I have used WP e-commerce for one product and it was a complete disaster. Maybe they've updated it and improved the code but I hardly saw code that bad. Thank you for the reply, but the site does not need e-commerce, just showcase of the products.
Pippin Williamson comments:
Ah, when you said "Products" I assumed you met e-commerce. In that case, I'd definitely go with Custom Post types. They offer the best way to separate "kinds" of content.
So set it up like this:
"Products" custom post type
--Custom taxonomy called "Categories" (for just the "Products" content type
--Custom Meta boxes to allow you to set multiple product images, details, description, etc.
flashingcursor answers:
I think your best option would be to do the following:
Product pages: Create a main products page, this is where you could showcase *all* of the products.
Individual product pages with your main product page as the parent page.
Your page structure would be:
Products
|___ Product 1
|___ Product 2
Etc...
Many Shopp style plugins will allow you to add a shortcode to any page to "add to cart" -- No complicated product setups that way -- just setup the product page to show off the product however you want.
The additional images (thumbnails) can be done using the built-in media management system, and with a couple very minor code additions (like 3 lines of code) you can enable the built-in thickbox support and even get "previous" & "next" links for your product images.
Static pages -- no problem.
Blog section -- Just a blog section.
Use a category like "Blog" for every post, then secondary categories to be able to narrow content down by category. A link to the category "blog" will then show all blog posts.
flashingcursor comments:
You could also create a custom post type -- but assuming you only plan on having a small handful of products, it'd be overkill to create a custom post type and/or taxonomy.
jedw comments:
It'll not be a handful of products but many and will be an important aspect of the CMS/site
Milan Petrovic answers:
To separate the content use custom post types, and create post type for products. Use custom taxonomies for better classification not only categories. For both I recommend my plugin GD Custom Posts and Taxonomies Tools:
Lite: http://wordpress.org/extend/plugins/gd-taxonomies-tools/
Pro: http://dv4p.com/gdtt
Milan
Baki Goxhaj answers:
What I advice you to do is create a <strong>Custom Post Type</strong> called <strong>Products</strong>.
You will have your separate backend section for adding and editing products and also a separate front end display where your blog posts will not mess with your products. You can add categories and and tags too to products which will also be separate form the categories and tags of the blog posts.
This is the most efficient and scalable solution.
I would like to do this job for you, if you agree.
jedw comments:
Can you point me to some good tutorials and/or example websites? Thank you!
Baki Goxhaj comments:
All you need is these to links:
<strong>Create content types</strong>: http://codex.wordpress.org/Function_Reference/register_post_type
<strong>Create custom taxonomies</strong>: http://codex.wordpress.org/Function_Reference/register_taxonomy
At the end of each link, you have sample code you can use immediately.
jedw comments:
Thank you Baki, and I have a final question; I use custom post types and custom taxonomies in my theme, and for the taxonomy.php template, I want it to redirect to the latest post from the queried term. Do you know how to achieve this?
Michelle Dancer answers:
Baki has the correct solution, but if you're still looking for good tutorials on how to set it up you can't really go wrong with these.
[[LINK href="http://net.tutsplus.com/tutorials/wordpress/rock-solid-wordpress-3-0-themes-using-custom-post-types/"]]http://net.tutsplus.com/tutorials/wordpress/rock-solid-wordpress-3-0-themes-using-custom-post-types/[[/LINK]] covers custom post types (in fact I think they use "products" as the example, and [[LINK href="http://net.tutsplus.com/tutorials/wordpress/introducing-wordpress-3-custom-taxonomies/"]]http://net.tutsplus.com/tutorials/wordpress/introducing-wordpress-3-custom-taxonomies/[[/LINK]] is just a bit more about custom taxonomies.
It can be a bit fiddly the first time you set this up, if you get 404 errors on your new content type remember to reset your permalinks as that usually fixes it.