Exchange-Themes

(Difference between revisions)
Jump to: navigation, search
Line 7: Line 7:
 
Out of the box exchange uses the standard page template (<code>page.php</code>) and <code>the_content</code> filter for displaying the content of all exchange templates (except the Super Widget).
 
Out of the box exchange uses the standard page template (<code>page.php</code>) and <code>the_content</code> filter for displaying the content of all exchange templates (except the Super Widget).
  
In order to customize the template, you should create a new file named <code>exchange.php</code>, add it to your theme's root directory and add the following code:
+
== Ghost Pages ==
 +
 
 +
Ghost pages are pages &quot;created&quot; by Exchange but do not exist in the standard pages section of the admin area.
 +
 
 +
In order to customize the content of Ghost Pages completely, we recommend creating a file named <code>page.php</code>, adding it to the <code>exchange</code> directory (<code>themename/exchange/page.php</code>) and adding the follow code:
  
 
<pre>get_header();
 
<pre>get_header();
Line 17: Line 21:
 
get_sidebar();
 
get_sidebar();
 
get_footer();</pre>
 
get_footer();</pre>
Of course this example is for a standard WordPress theme. If you are using a theme that uses a different method of rendering the loop (e.g. Builder) you will need to place the necessary code in <code>exchange.php</code>. However, The main code should always include:
+
Of course this example is for a standard WordPress theme. If you are using a theme that uses a different method of rendering the loop (e.g. Builder) you will need to place the necessary code in <code>exchange/page.php</code>.
  
<pre>while ( have_posts() ) : the_post();
+
For a full list of the Ghost Pages visit Exchange » Settings » Pages in your WordPress admin area.
    the_content();
+
endwhile;</pre>
+
== Ghost Pages ==
+
  
Ghost pages are pages &quot;created&quot; by Exchange but do not exist in the standard pages section of the admin area.
+
== Products ==
  
In order to customize the content of Ghost Pages completely, we recommend creating a file named <code>page.php</code>, adding it to the <code>exchange</code> directory (<code>themename/exchange</code>) and adding code similar to that in <code>exchange.php</code>.
+
In order to customize the content of single product pages, we recommend creating a file named <code>product.php</code>, adding it to the <code>exchange</code> directory (<code>themename/exchange</code>) and add the following code:
  
For a full list of the Ghost Pages visit Exchange » Settings » Pages in your WordPress admin area.
+
<pre>get_header();
  
== Products ==
+
it_exchange_get_template_part( 'content', 'product' );
  
In order to customize the content of single product pages, we recommend creating a file named <code>product.php</code>, adding it to the <code>exchange</code> directory (<code>themename/exchange</code>) and adding code similar to that in <code>exchange.php</code>.
+
get_sidebar();
 +
get_footer();</pre>
 +
Again, you may need to add different code depending on your theme.
  
 
== Function Calls ==
 
== Function Calls ==
  
 
In order to call Exchange's data in template files, you will use <code>it_exchange()</code> for every theme API call. We are working on the documentation for this, but you can find working examples within the Exchange templates.
 
In order to call Exchange's data in template files, you will use <code>it_exchange()</code> for every theme API call. We are working on the documentation for this, but you can find working examples within the Exchange templates.

Revision as of 13:51, June 17, 2013

Back to Exchange Main Page

We've worked hard to make creating a theme for Exchange as simple as possible.

To get started, simply copy all of the template files from Exchange (ithemes-exchange/lib/templates/) into a directory named exchange at the root of your theme's directory (e.g. themename/exchange).

Out of the box exchange uses the standard page template (page.php) and the_content filter for displaying the content of all exchange templates (except the Super Widget).

Ghost Pages

Ghost pages are pages "created" by Exchange but do not exist in the standard pages section of the admin area.

In order to customize the content of Ghost Pages completely, we recommend creating a file named page.php, adding it to the exchange directory (themename/exchange/page.php) and adding the follow code:

get_header();

while ( have_posts() ) : the_post();
    the_content();
endwhile;

get_sidebar();
get_footer();

Of course this example is for a standard WordPress theme. If you are using a theme that uses a different method of rendering the loop (e.g. Builder) you will need to place the necessary code in exchange/page.php.

For a full list of the Ghost Pages visit Exchange » Settings » Pages in your WordPress admin area.

Products

In order to customize the content of single product pages, we recommend creating a file named product.php, adding it to the exchange directory (themename/exchange) and add the following code:

get_header();

it_exchange_get_template_part( 'content', 'product' );

get_sidebar();
get_footer();

Again, you may need to add different code depending on your theme.

Function Calls

In order to call Exchange's data in template files, you will use it_exchange() for every theme API call. We are working on the documentation for this, but you can find working examples within the Exchange templates.

Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox