Introduction

An extension extends or overrides the structure and/or style of a child theme. This is done via functions.php (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.

By default, Builder ships with 6 extensions which are designed to be used for displaying a listing of entries like Posts page or a category page or a archive. The default extensions reside in extensions directory under parent Builder directory. If you would like to make any changes to the extension files, copy the extension directory from parent Builder into child theme under a directory named extensions.

The reason why this category page is not using the default layout (Right Sidebar in this example) is because a view is present that associates Archives view with Full Width layout by default in Builder.

How to apply (use) an extension

Example 1

Scenario:

Front page shows a static page.

Page titled "Blog" is set as Posts page.

The above two can be set in WP dashboard at Settings -> Reading.

How to apply "Teasers Layout - left" extension to the Posts page:

Case A

You have created a layout named "Blog Layout" to be used for your site's Posts page, i.e., for sitename.com/blog

Case B

Note: If the default layout uses an extension, that extension will take precedence over the one created in the above view. In such cases, create a separate layout for the Posts page and use it as explained in Case A above.

List of extensions that Builder comes with

Featured Image Grid & Showcase

To apply Featured Image Grid & Showcase extension to Issues category page, we should add a view like so:

Screenshot of the category page on site:

Note:

The images that appear on the page are featured images added in the posts.

The output will not show any post that does not have a featured image.

Featured Image Slider

Displays Featured Image & Post Title of first 6 posts in a custom slider and the Featured Image, Post Title & Excerpt for the remaining posts.

Page Not Found message appears below the slider because there are only 3 posts. If we add 1 more,

Magazine Layout

Portfolio Layout

Teasers Layout - Image Left

Teasers Layout - Image Right

Miscellaneous

It is not possible to override the parent or child theme's 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.

Examples of customizing Extensions

Styling ContactBuddy

Showing posts from a category on a separate Page and applying an extension

Every category in WordPress by default will have a auto-generated page visible at a URL like http://yoursite.com/category/category-a (where category-a is the slug for a category titled Category A). We call this category page. It is straight forward to use a extension on this page by going to My Theme -> Layouts and Views, then Views tab, and adding a view to set a layout for our desired category page.

Let's say we want to have all posts from Issues category appear on a Page titled Issues List and use Magazine extension, follow the steps below. i.e., the objective is to have http://localhost/builder3/issues-list/ appear like the above screenshot.

1. Copy the extension that you would like to be use from parent directory into child directory

Ex.: from wp-content/themes/Builder/extensions/magazine to wp-content/themes/BuilderChild-Thinner/extensions/magazine

Note: If the child theme directory does not contain extensions directory, create it.

4. Create a Page in which you would like to have the posts from the specific category appear and set the layout to the one created in above step.

Ex.:

That's it!

If you would like to show posts from another category similarly on another Page, repeat the above process to create a new extension while remembering to specify the category ID and apply it to the Page.

Update

One extra step has to be done in addition to the above to apply the above method in the case of Featured Image Grid & Showcase.

Modifying Portfolio extension so that 2 images appear per row rather than 3

Before:

After:

Note:

The width and height values used in the steps below are to be taken only as an example and are not to be treated absolute. They may have to be changed depending on child theme you are using and the layout width.

We are going to edit the extension in parent theme directly. When Builder is updated, our custom edits will be erased. Therefore you have to either take a backup of the extension before updating and re-apply the changes or duplicate the extension, place it in child theme while making sure function names are changed.

When Slider extension is applied to a layout or view and that layout is used in a listing page (Ex.: Posts page, archives), the sliding images will be featured images attached to the blog posts. When you have WP e-Commerce plugin activated and would like to show images attached to products belonging to a specific WPEC category in the Slider, follow this:

How to show Read More below each excerpt when using 'Teasers Layout - Image Left' extension

Before

After

When 'Teasers Layout - Image Left' extension is applied to a listing page 'Read More' link appears only if the post has more than 60 words. If you would like to show Read More at the bottom of every excerpt regardless of the number of words in the post, follow this:

1. Copy the extension to your child theme under extensions directory and edit its functions.php.