Grow your CSS skills. Land your dream job.

Posts and Categories

  • # December 8, 2009 at 10:38 am

    I have WordPress 2.8.6 on a godaddy account.
    I have several sections of my site that I want my client to be able to add posts i.e… Recipes, Tips, Rules, Music, Events, Blog.

    Should I have the client create posts and mark them with the appropriate category and then should I create a page with it’s own custom template for each section? And then write code for each page that only shows the appropriate category?

    So going to mysite.com/recipes would only display posts marked with the ‘recipes’ category.

    Is this the best way?

    Thanks,
    Mike

    # December 8, 2009 at 1:02 pm

    Yes, I would create a new page.

    Having said that, you don’t necessarily need to create separate templates for each category. You could create one template called Specific Categories (or whatever) and then code it like this:

    If page id = ##, then:

    only show posts with cat id = ##

    Else if page id = ##, then:

    only show posts with cat id = ##

    ….

    Etc etc

    Then apply this template to each page that you want to show only one category of posts on.

    # December 8, 2009 at 1:09 pm

    Great idea, thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".