Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Theme Switching

Theme Switching is the process of providing the ability for the user to change the presentation styles or "look" of your site with the use of a Theme Switcher. The process of changing your WordPress Theme by the site Administrator is not called theme switching. Information on changing your site's Theme is found at Using Themes.

Theme Switchers are add-ons which allow the user to control the look of your site. Some Theme Switchers are manually chosen by the user, and others will change the look of the site with every page refresh.

Using Theme Switchers

Using Theme Switchers to enhance your site can showcase your talents as a web page designer, or provide entertainment for your users.

Whatever your reasons for using Theme Switchers, make sure that each theme you use has been thoroughly tested and validated for errors. Make sure that it works well with the content on your site.

Most WordPress Themes come ready out of the box to handle most layout concerns, but not for specific XHTML uses and CSS needs you may use within your posts. Check for any specific styles required within your posts that may not be addressed by each Theme such as:

  • blockquotes
  • deeply nested lists
  • headings past h3 like h4 and h5
  • use of graphics

If necessary, make sure each Theme features the additional styles in that Theme's style sheet. In case you made customization to the style sheet yourself, make sure to make a child themes for each theme that had style modifications; in order to avoid losing those modifications next time you upgrade the theme.

Adding Themes for Switching

WordPress Presentation Panel
There are a variety of WordPress Themes to choose from to allow users to select from. You will find instructions on where to find and install them at Using Themes. If you would like to design your own Themes, whether for fun or for public distribution, read the article on Theme Development.

Different tools for Theme Switching are listed below, but in general the Themes in your /wp-content/themes/ folder will dictate the number of Themes avaiable for the user to switch between.

Theme Switching Tools

Ryan Boren's Theme Switcher in Action
There are a variety of methods for providing Theme Switching to visitors on your site.

To switch themes with these plugins you can enter a URL such as this in your browser:

http://www.sample.com/index.php?wptheme=WordPress+Classic (Theme Switcher)
http://www.sample.com/index.php?theme=classic (Theme Test Drive)
http://www.sample.com/index.php?theme=twentytwelve (Theme Test Drive)

Theme Preview also allows you to specify which stylesheet to use.

This page is marked as incomplete. You can help Codex by expanding it.