Check out our latest templates:
  • Inspiredblog theme Inspiredblog theme
  • A Classy Theme A Classy Theme
  • Fancy Theme Fancy Theme
  • Book Template Book Template
  • TealGray Retro theme TealGray Retro theme
  • MinimaxWhite MinimaxWhite
  • Business in Color II Business in Color II
  • Business in Color I Business in Color I

Inspiredblog: How to disable style switchers and select your default color?Fri, Oct 9, 2009 in Tutorials, WP templates

Inspiredblog: How to disable style switchers and select your default color?

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:

Categorized as Tutorials, WP templates

About the Author

Danny is a freelance web designer and developer based in Zagreb, Croatia. He is also the founder and owner of Mip Design Studio. In his free time, he creates mostly wordpress themes sold on Themeforest, and on this blog gives support, advices and help. Contact the author | Visit authors website

Comments

One Response to “Inspiredblog: How to disable style switchers and select your default color?”

Leave a Reply