0
votes

I would like to be able to display pages for wordpress plugin: 'wp e-commerce' in a different page template than the normal index.php page.

An example URL for the cart is: products-page/checkout/

However, it just fits that content into the index.php template. Is there a way to create a different page template or an if/else statement that changes based on which e-commerce page the user is on, like how the native wordpress hierarchy works?

Thanks!

1

1 Answers

0
votes

I found you could target page titles with conditional statements, then used the page title for the checkout page and created this:

<?php
if (is_page( 'Checkout' ) ) {
    if ( have_posts() ) : while ( have_posts() ) : the_post();
        the_content();
        endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<?php }   
else{ ?>
    <!--Normal Page Content-->
<?php  } ?>