Using variables (3 posts)

  1. armstrong1118
    Posted 8 years ago #

    I am working on a portfolio website that has projects listed under multiple categories. I want to try and set up the sidebar navigation to reflect projects that relate to the category the user was looking at. for example: if a user goes services > web > project 1, I want to set up the sidebar to have all of the web projects listed.

    But since project 1 can also be classified as a print piece, if they go services > print > project 1, I would like the sidebar to show all of the print pieces.

    I am currently working with a dynamic sidebar to try and work these things out.

    My question is, ultimately I would like to pass a variable from lets say the web section to the project 1 post then to the sidebar to tell it which posts to list.

    Anyone know if or how its done?

  2. Adam Brown
    Posted 8 years ago #

    Not sure what you mean. Can't you just tack a get variable onto the URL?

  3. deanhatescoffee
    Posted 8 years ago #

    You should look into conditional tags. Here's an article I wrote about 'em - they should do the trick. Basically, with conditional tags, you can display certain things on certain pages which sounds like what you're trying to do.

Topic Closed

This topic has been closed to new replies.

About this Topic