WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can i display 4 diferent themes for an archive page When i click on the right in corner i want to display another theme, another Css style (my own)

Something like this.



share|improve this question
up vote 0 down vote accepted

It appears that the site you linked to is just using a url parameter to specify which view to serve. A simply way to accomplish this is to create four different loop templates, each employing a different layout. Using the example site, you would need the following:

loop-complex.php, loop-simple.php, loop-poster.php and loop-logo.php

Then your normal templates (index.php, archive.php) would start out as something simple like this:


$view = 'complex';
get_template_part( 'loop', $view );


Now all that is needed is to process the url parameter and change which loop template is pulled in based on it's value (and of course making sure it is a valid value):

$view = 'complex';
$mode = stripslashes( $_GET["layout"] );
$modes = array('complex', 'simple', 'poster', 'logo');
if(in_array($mode, $modes)) $view = $mode;
get_template_part('loop', $view);

Then you just code the four different loops to make the different layouts appear how you want them to.

share|improve this answer
solved. Thanks Ed Burns!! – Batman Jan 1 '13 at 21:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.