Inspiredblog: How to disable style switchers and select your default color?Fri, Oct 9, 2009 in Tutorials, WP templates
My latest theme Inspiredblog, has a pretty cool feature called style switcher. This gives some kind on interactivity to your visitors as it allows them to choose color/style they like when surfing your site. In this theme I use two style switchers, one for background body/logo/color and other one for footer background/color.
Option to disable color switchers?
I’m planning to implement this option in “Theme options” panel so that administrators can select their own color/style and disable one or both style switchers. But, for now yu have to do it manually.
Step 1: Select your header style
Open “header.php” file and locate styles for body styles:
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/body2.css" title="body2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/body1.css" title="body1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/body3.css" title="body3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/body4.css" title="body4" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/body5.css" title="body5" media="screen" />
You see that there are five stylesheets and four of theme have “alternate” in “rel” attribute. This means that the first one is default and active. Now, delete the styles you don’t want to use, leave the one that will remain as default and delete “alternate” option from “rel” attribute. Result is only one body style.
Step 2: Select your footer style
Open “header.php” file and locate styles for footer styles:
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/foot3.css" title="foot3" id="foot3" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/foot1.css" title="foot1" id="foot1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/foot2.css" title="foot2" id="foot2" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/foot4.css" title="foot4" id="foot4" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/css/foot5.css" title="foot5" id="foot5" media="screen" />
and follow all the steps as for body styles.
Step 3: Remove body style switcher
Open “sidebar_switcher.php” file and comment or delete complete code.
Step 4: Remove footer style switcher
Open “page_footer_switcher.php” file and comment or delete complete code.
Finally
Unfortunately, if you want to disable style switchers, you have to follow these steps. I’m working on new update for this theme which will have this option implemented in “Theme options” panel, among other new features. This update will be released by the end of this month.
Related posts:
- Inspiredblog: How to implement filmstrip navigation from FancyTheme
- ChangeLog – FancyTheme v4.2
- ChangeLog – FancyTheme v3.1
- Inspiredblog: How to set up a simple contact form using Contact Form 7 plugin






Chris October 12th, 2009 at 1:54 am
Thanks, Mip, for these instructions! Very helpful!