• Hello, im currently making a custom child theme with WP Bootstrap Starter and i want to customize the shop page, i havent been able to do it, and reading on the internet i find this.

    WooCommerce has two ways to handle templates one is /themes/yourtheme/woocommerce/…… with templates modified from /plugins/woocommerce/templates. By doing it this way, all pages can be properly customized.

    The other, is /themes/yourtheme/woocommerce.php. This is what WP Bootstrap Starter
    does. The problem with woocommerce.php is it’s a “catch all” for WooCommerce, and does not allow any customization of at least woocommerce/archive-product.php.

    https://docs.woothemes.com/document/third-party-custom-theme-compatibility/

    is there a safe way to allow the child theme works without the woocommerce.php form the parent theme so i can work with the woocommerce/archive-product.php and customize how i need?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Afterimage Designs

    (@afterimagedesigns)

    Hi phantomtnt,

    Thank you for using WP Bootstrap Starter theme, If you don’t want to use the woocommerce.php in the theme you can just add the woocommerce template directory to your theme and rename it to woocommerce from there you can edit the look and layout of each woocommerce page but it is more difficult than just using the woocommerce.php with the woocommerce_content() function.

    For that the woocommerce.php page need to include the folowing:

    <?php
    $template_name = ‘/archive-product.php’;
    $args = array();
    $template_path = ”;
    $default_path = untrailingslashit( plugin_dir_path(__FILE__) ) . ‘/woocommerce’;

    if ( is_singular( ‘product’ ) ) {

    woocommerce_content();

    //For ANY product archive, Product taxonomy, product search or /shop landing page etc Fetch the template override;
    } elseif ( file_exists( $default_path . $template_name ) )
    {
    wc_get_template( $template_name, $args, $template_path, $default_path );

    //If no archive-product.php template exists, default to catchall;
    } else {
    woocommerce_content( );
    }

    ;?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Woocommerce shop customization child theme’ is closed to new replies.