WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Template single-product.php won't override (1 post)

  1. Paxjah
    Member
    Posted 1 year ago #

    WordPress v3.5.1 | Woocommerce v2.0.10

    I've copied the templates folder to my theme folder and renamed it woocommerce, I know it is working because my override for the archive-product template works.

    What I am attempting to do is put the sidebar inside wrapper_end rather than outside of it, it works when i make the change to archive-product, but when I do the same thing with single-product no change is made.

    Would anyone know another way to do this, or show me what I am doing wrong?

    Thank you in advance for any help with this issue :)

    <?php
    /**
     * The Template for displaying all single products.
     *
     * Override this template by copying it to yourtheme/woocommerce/single-product.php
     *
     * @author 		WooThemes
     * @package 	WooCommerce/Templates
     * @version     1.6.4
     */
    
    if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    
    get_header('shop'); ?>
    
    	<?php
    		/**
    		 * woocommerce_before_main_content hook
    		 *
    		 * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
    		 * @hooked woocommerce_breadcrumb - 20
    		 */
    		do_action('woocommerce_before_main_content');
    	?>
    
    		<?php while ( have_posts() ) : the_post(); ?>
    
    			<?php woocommerce_get_template_part( 'content', 'single-product' ); ?>
    
    		<?php endwhile; // end of the loop. ?>
    
    	<?php
    		/**
    		 * woocommerce_sidebar hook
    		 *
    		 * @hooked woocommerce_get_sidebar - 10
    		 */
    		do_action('woocommerce_sidebar');
    	?>
    
    	<?php
    		/**
    		 * woocommerce_after_main_content hook
    		 *
    		 * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
    		 */
    		do_action('woocommerce_after_main_content');
    	?>
    
    <?php get_footer('shop'); ?>

    http://wordpress.org/extend/plugins/woocommerce/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic