Support » Fixing WordPress » Mastering CMS in WP

  • In the Book Professional WordPress Design and Development. On page 303 content organization, states “create a category or tag for each product on the site, and then organize posts about the product the first post in each category should be the product information and probably a link to a shopping cart etc. etc.

    When I’m trying to do is exactly that but the first post doesn’t stay as the first. If I make the post a page and put all the product information there. How I get subsequent posts to show?

    I see some talk about adding a second loop to a page that would display the posts. Is this the correct way to do this in the 3.x series of WordPress?

    Any help you can get give me and pointing me to the right direction will be greatly appreciated.
    Best Regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @ron,

    I’m guessing the book you are reading was written before Custom Post Types in v3.0? I’d suggest creating a custom post type “Product” and a custom taxonomy called “Product Category” or similar. Then you’ll be able to organize your products as products instead of as posts, and the product category taxonomy will let you classify them.

    Here are some links to get you started:

    Hope this helps.


    Thanks A lot I been looking at Custom Post types, but haven’t mastered them yet.

    This will get me started

    Thanks for your help

    Let me try to explain myself better. When I’m trying to accomplish is more like a CMS.

    I went to have a sticky post or page that explains what to expect in a particular category.
    Example is the category was viral marketing. It would be a couple paragraphs about viral marketing and then they list of all the posts in that category.

    There will be many different categories all of them in the menu.

    I am almost there but a mile away, if I could manage to make the first post sticky I’d be home free. Maybe a visual would help you can see it at

    I’ve investigated custom post I can see how that would solve the problem although it’s a very interesting and powerful the addition to the WordPress toolbox.
    Any help or direction will be greatly appreciated.

    I have done something similar in a couple of sites. The solution is to use two loops in a template.

    First, get an array of the sticky post IDs using get_option(‘sticky_posts’).

    Then, in the first loop, get posts that are in the category and also have an ID in the sticky posts array.

    In the second loop, exclude posts whose ID is in the sticky posts array.

    thank you I’ve been looking at two loops but my code skills are very rusty,actually almost nonexistent when it comes to PHP. Would you be willing to share the code if not publicly privately.

    I would be willing to pay for your help.
    Thanks and Best Regards

    The code I used is posted here.

    It works with the theme I used, but you will probably need to tweak it for your theme to get the appearance right.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Mastering CMS in WP’ is closed to new replies.