Title: Single.php
Last modified: August 18, 2016

---

# Single.php

 *  [questionman](https://wordpress.org/support/users/questionman/)
 * (@questionman)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/singlephp-1/)
 * The way I have my blog set up, I have eight seperate categories. Each one of 
   these categories basically has its own page. They all look the same, except the
   color scheme throughout each page.
 * Sometimes, however, I will have a post that applies to more than one of these
   categories. As a result, it winds up displaying on more than one of these eight
   pages. The problem here is, when you click on the post, and it goes to the single.
   php page, it always displays it in one of the theme colors (which means you could
   have been on a ‘green’ page and it displays ‘brown’ for instance)
 * My single.php is basically set up as an if-else block. If post is in category#,
   then use cat1single.php, else if in cat ##, use cat2single.php, etc.
 * Now, I know obviously wordpress will pick the first single that satisfies the
   if-statement. So my question is, is there a way for wordpress to know which page
   the person was on when they clicked the post, to determine which single template
   to use?

The topic ‘Single.php’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [questionman](https://wordpress.org/support/users/questionman/)
 * Last activity: [19 years, 10 months ago](https://wordpress.org/support/topic/singlephp-1/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
