Builder Extensions

From IThemes Codex
Revision as of 03:19, February 7, 2011 by Sridhar (Talk | contribs)
Jump to: navigation, search

Introduction

An extension extends or overrides the structure and/or style of a child theme. This is done via functions.php (optional - to alter the structure) and style.css (to alter the style). An extension is nothing but a directory which typically has functions.php (optional), style.css plus optionally a corresponding images directory and resides under the child theme directory. An extension is applied to a layout.

Note: Only style.css and functions.php in an extension will be used. It is not possible to override the parent or child theme's other template files like index.php, archive.php, single.php, page.php. If any such files are present in an extension, they will simply be ignored.

When an extension has functions.php, it will be executed (for the page using that extension) after the theme's functions.php has been executed.

By default, Builder ships with 3 extensions: Blog, Blue Background and Magazine (click on the links to view their screenshots)

To apply one of these extensions to your desired layout, go to My Theme -> Layouts and select it from the Extension dropdown and save the layout.

Extension-option-in-layout.png

99% of the cases, we leave "Should this Extension disable the theme's style.css file?" to the default, No. If it is set to Yes, then the child theme's style.css will not be applied to (and hence used in) any view that uses this layout.

If you would like to edit one of the stock extensions or use your own, then DO NOT edit/add new in extensions directory under the parent Builder directory. Instead, create a new directory named "extensions" under your child theme and then copy the stock extension to it and modify or create a new one in it.

Sample Extensions

Magazine Extension Enhanced - with post thumbnails

Download this file, extract its contents to your computer and upload the "magazine-enhanced" folder to a directory named "extensions" under your child theme. Create extensions directory if it doesn't exist.

Edit the layout that's being used by your Posts page and apply "Magazine Enhanced" extension.

If you would like to change the dimensions of the thumbnail image (currently it is 150 x 150):

  1. set the width and height in line 16 of the extension's functions.php
  2. set the the same width and height as in the above step in extension's style.css around line 23
Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox