Title: Theme Layout Toggle
Last modified: August 21, 2016

---

# Theme Layout Toggle

 *  [ekdor](https://wordpress.org/support/users/ekdor/)
 * (@ekdor)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/theme-layout-toggle/)
 * Hi, I can’t seem to find information on how to create a toggle that will allow
   the user to switch the view they are looking at between two separate layouts (
   templates). What I need can’t be done just by toggling the css stylesheet.
 * Also I would like to hard code it into the theme and not use a plugin; regardless
   I haven’t come across one in any case.
 * Cheers,.

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

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [12 years, 11 months ago](https://wordpress.org/support/topic/theme-layout-toggle/#post-3846914)
 * Can you show us a website that does this already, to illustrate what you mean?
 *  Thread Starter [ekdor](https://wordpress.org/support/users/ekdor/)
 * (@ekdor)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/theme-layout-toggle/#post-3846925)
 * Well There are many that will show a list of entries and you can toggle it between
   a grid and a list. [http://www.tv.com/shows/game-of-thrones/episodes/](http://www.tv.com/shows/game-of-thrones/episodes/)
   Not sure if this is the method I want but it’s the kind of behaviour.
 * Been thinking about it some more. I’m not advanced enough to figure this out 
   myself. But I assume I could us an if statement in the loop that checks the state
   of the toggle and marks up using the corresponding set of php. This would contain
   the two states within the one php file.
 * Cheers,.
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [12 years, 11 months ago](https://wordpress.org/support/topic/theme-layout-toggle/#post-3846929)
 * It looks like they’ve just implemented jQuery tabs
    [http://jqueryui.com/tabs/](http://jqueryui.com/tabs/)
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [12 years, 11 months ago](https://wordpress.org/support/topic/theme-layout-toggle/#post-3846931)
 * You could also use the toggleClass function to just add a class/ remove it on
   the click of particular buttons, so that you can lay out your content differently.
   
   [http://api.jquery.com/toggleClass/](http://api.jquery.com/toggleClass/)
 *  Thread Starter [ekdor](https://wordpress.org/support/users/ekdor/)
 * (@ekdor)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/theme-layout-toggle/#post-3846932)
 * I see. I’ll follow the toggleClass lead. Thanks.

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

The topic ‘Theme Layout Toggle’ is closed to new replies.

## Tags

 * [layout](https://wordpress.org/support/topic-tag/layout/)
 * [template](https://wordpress.org/support/topic-tag/template/)
 * [toggle](https://wordpress.org/support/topic-tag/toggle/)

 * 5 replies
 * 2 participants
 * Last reply from: [ekdor](https://wordpress.org/support/users/ekdor/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/theme-layout-toggle/#post-3846932)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
