• I just created 2 completely unrelated Amazon astores for example purposes. So let’s say I want one tab to be Electronics, and the other to be Cosmetics.

    Basically what I need to do is create a separate template for each store/tab. So….. One would be

    <?php
    /*
    Template Name: Cosmetics
    */
    ?>
    <?php get_header(); ?>
    <iframe src=”https://astore.amazon.com/cosmetics-20&#8243; width=”80%” height=”800″ frameborder=”0″ scrolling=”no”></iframe>
    <?php get_footer(); ?>

    And the other would be

    <?php
    /*
    Template Name: Electronics
    */
    ?>
    <?php get_header(); ?>
    <iframe src=”https://astore.amazon.com/electronics-20&#8243; width=”80%” height=”800″ frameborder=”0″ scrolling=”no”></iframe>
    <?php get_footer(); ?>

    Everything seems to work fine when only one template is applied, however, whenever I try to use the second template nothing seems to happen? Is there some sort of a trick to make this work, or does WordPress simply not support this?

    I searched for an answer, but couldn’t find anybody having a similar issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter igaryok

    (@igaryok)

    bump

    Would be interested in knowing if you resolved this as we’d like to do exactly the same thing.

    Templates are assigned to pages, categories or post. So, you can use conditional tags to get the template needed:

    <?php if ( is_category(X) ) {
    	include(TEMPLATEPATH . '/template_1.php');
    }

    Or if it is a page

    <?php if ( is_page(X) ) {
    	include(TEMPLATEPATH . '/template_2.php');
    }

    Include the template in which file?

    S.K

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multiple templates in one blog?’ is closed to new replies.