Style Manager

From IThemes Codex
Revision as of 14:36, March 31, 2011 by Sridhar (Talk | contribs)
Jump to: navigation, search

Contents

Introduction

Style Manager is a plugin for iThemes Builder that provides a easy interface to adjust styling of various elements of Builder theme.

It can be downloaded from Member Panel.

Style Manager Support Forum

FAQ

Styles appear in preview window but not on the site

  • Use Firefox. Do not use other browsers, especially IE when using Style Manager.
  • Ensure that your site is hosted on a server that runs PHP 5, not PHP 4. ServerBuddy plugin can be used to check this and more. You can contact your host for help on upgrading from a older version of PHP to version 5.

Preview window is too small to be usable

Ensure that WordPress address and Site address are the same at Settings -> General.

More info.

How to add fonts

It is possible to add font stacks and font sizes by adding code to child theme's functions.php.

Example code:

function customize_font_stacks( $font_stacks ) { 
    $new_font_stacks = array(
        "Arial, 'Helvetica Neue', Helvetica, sans-serif"  => 'Arial',
        "Baskerville, 'Times New Roman', Times, serif"    => 'Times',
        "'Century Gothic', 'Apple Gothic', sans-serif"    => 'Century Gothic',
    );
    
    return array_merge( $font_stacks, $new_font_stacks );
}
add_filter( 'builder_filter_style_manager_general_font_families', 'customize_font_stacks' );
function customize_font_sizes( $font_sizes ) { 
    $new_font_sizes = array(
        '37px'      => '37px',
        '37%'       => '37%',
        '37pt'      => '37pt',
    );
    
    return array_merge( $font_sizes, $new_font_sizes );
}
add_filter( 'builder_filter_style_manager_general_font_sizes', 'customize_font_sizes' );

A useful site for font families is http://font-family.com/

Source: Style Manager Suggestions section at http://ithemes.com/forum/index.php?/topic/1146-what-would-you-like-to-see-next-in-builder/page-7/#p36785

Why are multiple CSS files being created? Which is the main one?

Only the last .css file is needed and used. The others can be deleted.

Ex.: If you see the following file listing in wp-content/uploads:

builder-style-4c574af0c3875.css

builder-style-4c574af0c38751.css

builder-style-4c574af0c38752.css

builder-style-4c574af0c38753.css

builder-style-4c574af0c38754.css

builder-style-4c574af0c38755.css

Only builder-style-4c574af0c38755.css is used (note the bold characters). The first one in the list was the original one that was created. The additional ones were created since the file already existed. The code adds one to the end of the file, tries again, and then increments the number until an original file name is created, thus the pattern.

Originally this was done to bypass a WordPress MU (now MultiSite) issue. The bug was that the old one was not removed. This is no longer necessary, so a future version of Style Manager will remove this undesired behavior while also automatically cleaning up after itself.

Source: http://ithemes.com/forum/index.php?/topic/13023-issues-with-style-sheets-and-footer-module/#p60867

Useful tips and forum links

  • See this forum topic on permissions. Summary: "Anyway I discovered the css files being created in wp-content/uploads were being created with rw rw — permissions and as soon as I changed the file permissons to be rw rw r it all worked perfectly."
  • If you are using 1&1 hosting, create a single line .htaccess file with this code "AddType x-mapp-php5 .php" and upload it to the root. Source

Scope/Limitation

It is not possible to apply one set of styles to the complete module or individual widgets of a module differently than other modules of that type. i.e., the styles that you set to widget bar modules will apply to all widget bar modules. Ex.: You will not be able to apply say, a blue background to just one widget bar module while the rest of them have been set to say, a red background via Style Manager. For such changes, style.css has to be edited manually.

Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox