• Hi i’ve a problem with Woocommerce and integration in my theme (white-Rock from themeforest), i found a fix but i don’t know how to use it,

    The problem: woocomerce product page and single product page use the blog page template by default

    The 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”.

    I’ve tryed to modify the functions.php of my template but really i don’t know how, or better i’ve tryed but it didn’t worked :/ can anyone help me to apply the fix ?? ?

    thanks

    https://www.ads-software.com/extend/plugins/woocommerce/

  • The topic ‘Woocommerce custom theme’ is closed to new replies.