Title: Custom Template Error
Last modified: August 21, 2016

---

# Custom Template Error

 *  [holy88](https://wordpress.org/support/users/holy88/)
 * (@holy88)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/custom-template-error/)
 *     ```
       Hi i've a problem with the integration of woocommerce and my template (White Rock from themeforest:
   
       Woocomerce product page and single product page use the "blog" page template by default, ad i don't want it :) i found a similar problem and the fix but i don't know how to apply it, anyone can help me ?
   
       FIX:
       ```
   
 * By inserting a few lines in your theme’s functions.php file, First unhook the
   WooCommerce wrappers;
 * remove_action( ‘woocommerce_before_main_content’, ‘woocommerce_output_content_wrapper’,
   10);
    remove_action( ‘woocommerce_after_main_content’, ‘woocommerce_output_content_wrapper_end’,
   10);
 * Then hook in your own functions to display the wrappers your theme requires;
 * add_action(‘woocommerce_before_main_content’, ‘my_theme_wrapper_start’, 10);
   
   add_action(‘woocommerce_after_main_content’, ‘my_theme_wrapper_end’, 10);
 * function my_theme_wrapper_start() {
    echo ”; }
 * function my_theme_wrapper_end() {
    echo ”; }
 * Make sure that the markup matches that of your theme. So for white-rock theme,
   I replaced “main” with “container-sidebar”. Et voilà 🙂 [http://lafermedusarget.fr/boutique/amour-en-cage-or-24-carats-2/](http://lafermedusarget.fr/boutique/amour-en-cage-or-24-carats-2/)`
 * I’ve tryed to insert in my theme functions.php the code:
 * remove_action( ‘woocommerce_before_main_content’, ‘woocommerce_output_content_wrapper’,
   10);
    remove_action( ‘woocommerce_after_main_content’, ‘woocommerce_output_content_wrapper_end’,
   10); add_action(‘woocommerce_before_container-sidebar_content’, ‘my_theme_wrapper_start’,
   10); add_action(‘woocommerce_after_container-sidebar_content’, ‘my_theme_wrapper_end’,
   10);
 * function my_theme_wrapper_start() {
    echo ”; }
 * function my_theme_wrapper_end() {
    echo ”; }`
 * But i think it’s wrong :/ thanks for the help 🙂
 * [http://wordpress.org/extend/plugins/woocommerce/](http://wordpress.org/extend/plugins/woocommerce/)

The topic ‘Custom Template Error’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [hook](https://wordpress.org/support/topic-tag/hook/)
 * [template](https://wordpress.org/support/topic-tag/template/)
 * [woocommerce integration](https://wordpress.org/support/topic-tag/woocommerce-integration/)

 * 0 replies
 * 1 participant
 * Last reply from: [holy88](https://wordpress.org/support/users/holy88/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/custom-template-error/)
 * Status: not resolved