• This has probably been asked a million times but anyway I’d really appreciate it you guys could answer it for me. (rather than just pasting a link to another thread.)

    I want to be able to have multiple categories and be able to post to them.

    So I want a Home Page, About, Contact, etc. These can be standard static pages, but I also want to be able to have other dynamic pages which I can post to over and over again, with different categories.

    So, for example, I have an Apples page, an Oranges page and a Pears page and I want to be able to post all apples related posts in the Apples page and link to it from every other page, as /apples.

    If possible I would also want the page to look different to other pages so that I have apple related content in the sidebar, like ads related to apples, etc. I want the same, then, for /oranges /pears /bananas, etc.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’d really appreciate it you guys could answer it for me. (rather than just pasting a link to another thread.)

    Why? Don’t want to click through to read the solution?

    You are using WP pages all wrong; they are out of the post hierarchy and therefore out of the category hierarchy. Just create custom category pages for each category that you want. On each custom category template, you can insert conditional tags in the sidebar to generate the desired adsense code (I guess this is what you are getting at; but doesn’t Google serve up the ads according to content anyway so this isn’t really necessary?).

    Read about custom category pages here:
    http://codex.wordpress.org/Category_Templates

    And conditional code here:
    http://codex.wordpress.org/Conditional_Tags

    Thread Starter mmmguinness

    (@mmmguinness)

    Ok, that helps somewhat. I’ve created specific category files, category-1.php for apples, category-2.php for oranges, etc.

    I’ve snooped around and I know there are plugins to alter the sidebar so I can then allocate a different sidebar configuration to each category. [I’m not thinking so much about adsense rather relevant affiliate ads and banners for each category]

    The other thing I looked into is being able to have a static front page. I think I’ve found out how to do that so then all I’ll need to do is hack together some top navigation buttons for each of the categories. (an apples button, an oranges button, etc.)

    However now I’m going to ask a crazy question, probably a really crazy question but it’s worth a shot. I know that on posts I can change the name from /name-of-the-post to /shortname. But here’s the thing, is there any way I can change the physical URL so that instead of http://www.nameofmybloghere.com/categories/apples it will be http://www.nameofmybloghere.com/apples perhaps with some plugin or whatever?

    I know that’s a strange question but anyway.

    There are others who have posed the same question without getting much help sadly.

    What those who try to help don’t realize is that creating a category template doesn’t create a “navigation link”, which is why everyone who poses this question is asking how to list category posts on a “page”. It allows them to then organize the categories however they wish in their navigation.

    Ive been searching for a solution to this problem for a long time as I have been manually adding links to category pages in navigation areas in multiple custom themes to add this functionality. however you are limited to adding them in front or behind the other pages of the site.

    The problem as I see it is that WordPress should allow page objects be redirected to other uri elements or other objects.

    One solution might be to trick a page with a custom template into believing it is that of a specified category page but that is above me.

    Hopefully someone in the know can either make a plugin to this effect or enlighten us.

    I think it can be done but can be very tricky, someone with more knowledge could explain it better.

    If you want to display on an “oranges” page fixed (the content of that page post) as well as dinamic content (post from “oranges” category) you just create a page template with 2 loops, one for the content of the page itself, and another retrieving the post from the “oranges” categories.

    then you asign that template to your “oranges” page.

    This article covers the multiple loops:
    http://codex.wordpress.org/The_Loop

    I just think you should quit trying to bend WP just for the sake of doing so. the /category/ hierarchy was designed for a reason. If you use permalinks, it’s not hard to figure out what the link to a particular category will be if you wish to put a hard-coded link somewhere in your sidebar or elsewhere.

    Now, if you want to be really sly about it, you can create a page template, as described here:
    http://www.ivovic.net/2008/05/20/turn-a-wordpress-page-into-a-link

    Then create a new WP Page, title it however you want the link to appear, plop the URL to the category into the writing area and make the permalink whatever you want.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Multiple pages for different categories’ is closed to new replies.