Title: stflag's Replies | WordPress.org

---

# stflag

  [  ](https://wordpress.org/support/users/stflag/)

 *   [Profile](https://wordpress.org/support/users/stflag/)
 *   [Topics Started](https://wordpress.org/support/users/stflag/topics/)
 *   [Replies Created](https://wordpress.org/support/users/stflag/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/stflag/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/stflag/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/stflag/engagements/)
 *   [Favorites](https://wordpress.org/support/users/stflag/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Same article, two different layouts depending on category](https://wordpress.org/support/topic/same-article-two-different-layouts-depending-on-category/)
 *  Thread Starter [stflag](https://wordpress.org/support/users/stflag/)
 * (@stflag)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/same-article-two-different-layouts-depending-on-category/#post-2278107)
 * Here are two solutions that were suggested to me:
 * 1. Keep track of the latest category visited in a $_SESSION variable and thus
   you would know how to style the single article.
    By: Jacob Guite St-Pierre (Montreal,
   QC, Canada) [http://twitter.com/JacobGSP](http://twitter.com/JacobGSP)
 * 2. In categories Templates, customize the permalink by adding a query variable
   such as &skin=cat_id at the end of the permalink.
    Then in single.php, check 
   the presence of the query variable ‘skin’. In the case where it is there, wp_enqueue_style
   a CSS file that would manage the wanted look and/or include another single_skin_CAT_ID.
   php with the markup and the appropriate template tags. By: Alexandre Simard (
   Montreal, QC, Canada) [http://twitter.com/qbert72](http://twitter.com/qbert72)
 * Solution #2 worked better for us and solved the problem.
 * Thanks again to the Montreal WordPress Community to have helped me out with this
   very tricky issue!
 * Cheers,
    Stf
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Same article, two different layouts depending on category](https://wordpress.org/support/topic/same-article-two-different-layouts-depending-on-category/)
 *  Thread Starter [stflag](https://wordpress.org/support/users/stflag/)
 * (@stflag)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/same-article-two-different-layouts-depending-on-category/#post-2277876)
 * Thanks FlashBuddy.
 * We have multiple templates for our categories, our issue is calling the article
   to display in that template.
 * The context is that we’re launching a WordPress news website. A news article 
   must be displayed in its news category (Business for example) with a certain 
   layout but then we also want to display the same article in a weekly Case Study
   which has a different layout.
 * In other words we want the article layout to be different whether we are in Business
   or in the Case Study page.
 * How do you manage the URL of the article in this case?
 * Thanks.

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