Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #712811

    I have a sidebar on the right on the product page (Woocommerce). The problem is that it is showing the sidebar page widgets instead of the single product page widgets.

    I added to functions.php the following

    // adjust settings on init
    add_action(‘init’,’ava534345953_init’, 50);
    function ava534345953_init() {
    add_action( ‘woocommerce_after_single_product_summary’, ‘avia_add_sidebar’, 25);
    }

    function avia_close_image_div() {
    echo “</div>”;
    }

    function avia_add_sidebar() {
    if(is_product()) {
    $avia_config[‘currently_viewing’] = “shop_single”;
    get_sidebar();
    }
    }

    And I added to Quick CSS

    .single-product-main-image {
    width: 25%;
    }

    .single-product-summary {
    overflow: hidden;
    width: 45%;
    float: left;
    margin-right: 5%;
    }

    .single-product .sidebar {
    width: 25% ;
    }

    #top div.product .woocommerce-tabs {
    width: 75%;
    float: left;
    }

    #714029

    Hey Erik-Jan,

    does this happen with a default WordPress theme as well?

    Best regards,
    Andy

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.