WordPress.org

Ready to get started?Download WordPress

Forums

Per Category Different Sidebar? (6 posts)

  1. KlaasKoopman
    Member
    Posted 7 years ago #

    Hey All,

    Currently I am working on http://www.traveltop.nl and I would like to have the following:

    If you click on Categorie A, you will get to Page A, which will show you Sidebar A ( or menu A ). If you click on Categorie B, you will get to page B, which will also show you Sidebar B.

    Is this possible? If so, please let me know how!

  2. moshu
    Member
    Posted 7 years ago #

    It is possible - if you stop calling them Pages.
    What you need is category template(s) and different sidebars.

    You can have a separate template for each category - calling the sidebar like:
    <?php include (TEMPLATEPATH . "/sidebar_b.php"); ?>
    or, only one catgeory template with a lot of conditional tags.

  3. KlaasKoopman
    Member
    Posted 7 years ago #

    But the thing is, I need them to be pages... not blog posts. Cause I am using the blog posts as news and the pages as, well pages.

  4. moshu
    Member
    Posted 7 years ago #

    First of all Pages don't have categories, which means you are on the wrong track.
    And if you click on any catgeory name - that will never take you to a Page. Pages cannot display multiple posts. Period.

    If you want to succeed, you'll follow what I wrote above. Otherwise it will be a PITA. It's your choice.

  5. KlaasKoopman
    Member
    Posted 7 years ago #

    Dear Moshu,

    First of all, thank you for helping me.

    Okay so I need to create categories for each well subject of my site. I understand that, but then how do I create like that if you click on one of these categories you are getting a totally new design + sidebar?

  6. moshu
    Member
    Posted 7 years ago #

    I hate when people ask back without reading the suggested resources. I understood very well what you were trying to do and I posted the links to the relevant Codex articles.

    Category Templates = you can have a "totally new design" for each category. Did you read it? - (no)
    I also explained 2 (two) methods how to get different sidebars for each category template.

    Post back only if you followed the instructions from the Codex and your category templates are not working.

Topic Closed

This topic has been closed to new replies.

About this Topic