Title: Using variables
Last modified: August 18, 2016

---

# Using variables

 *  [armstrong1118](https://wordpress.org/support/users/armstrong1118/)
 * (@armstrong1118)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/using-variables/)
 * 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?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Adam Brown](https://wordpress.org/support/users/adamrbrown/)
 * (@adamrbrown)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/using-variables/#post-641469)
 * Not sure what you mean. Can’t you just tack a get variable onto the URL?
 *  [deanhatescoffee](https://wordpress.org/support/users/deanhatescoffee/)
 * (@deanhatescoffee)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/using-variables/#post-641470)
 * You should look into conditional tags. [Here’s an article](http://www.wpdesigner.com/2007/06/21/bring-life-to-your-blog-using-conditional-tags/)
   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.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Using variables’ is closed to new replies.

## Tags

 * [navigation](https://wordpress.org/support/topic-tag/navigation/)
 * [sidebar](https://wordpress.org/support/topic-tag/sidebar/)
 * [variable](https://wordpress.org/support/topic-tag/variable/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [deanhatescoffee](https://wordpress.org/support/users/deanhatescoffee/)
 * Last activity: [18 years, 7 months ago](https://wordpress.org/support/topic/using-variables/#post-641470)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
