Theming Exchange - Adding Custom Templates

From IThemes Codex
Revision as of 13:04, September 12, 2013 by Kopepasah (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

All of Exchange's default template parts are found in the /lib/templates directory. We have broken the structure of this directory down to pretty small and specific template parts. If your theme needs to modify one of the template parts, simply copy that file and its folder hierarchy over to your theme's /exchange/ folder.

We highly recommend only copying over the template parts that you must modify so that you don't have to update them when we modify template parts you haven't customized.

Examples

For each of the below examples you will copy the default template part(s) from the default templates directory of Exchange (ithemes-exchange/lib/templates/) over to your theme (your-theme/exchange/). Please note that some of these template parts are located within specific directories and must be copied over accordingly in order to work properly.


Customizing Product Images

The template part needed to customize how the product images function is content-product/elements/product-images.php. Copy this over to your theme (keeping the same directory structure) and make modifications accordingly.


Reordering Product Price & Description

The template part needed to rearrange these items is content-product/elements/product-info.php. Copy over this template part and rearrange the elements in the it_exchange_get_template_part_elements() array, switching base-price and description.

Before

array( 'base-price', 'description', 'super-widget' )

After

array( 'description', 'base-price', 'super-widget' )

This is a simple way to reorder the product price and destription and is can also be used in the same manner on many other templates.

There is another, more advanced method of reordering (or even removing) elements, but we will get into that later.



Previous: Customize the output for Exchange Ghost & Product Pages.

Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox