Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #613522

    G’day all,

    Have a small problem I have made some changes to single product page to make sidebar on the right following this thread here https://kriesi.at/support/topic/single-product-page-is-strange-sidebar-appears-under-product/
    All looks fine except the related products now using 2 rows Image and video hosting by TinyPic

    I have added the following to functions.php (child theme) with latest wordpress, enfold and woocommerce
    any help would be great thanks.

    #
    # wrap single product image in an extra div
    #

    function avia_add_image_div() {
    echo “<div class=’single-product-main-image alpha’>”;
    }

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

    #
    # wrap single product summary in an extra div
    #

    function avia_add_summary_div() {
    echo “<div class=’single-product-summary’>”;
    }

    function avia_close_summary_div() {
    echo “</div>”; //close out the summary
    get_sidebar();
    }

    function avf_product_sidebar_layout_mod($layout){
    if( is_single() )$layout = “sidebar_left”;
    return $layout;
    }

    add_action(‘init’, ‘ava_product_sidebar_mod’);
    function ava_product_sidebar_mod() {
    add_action( ‘woocommerce_before_single_product_summary’, ‘avia_add_image_div’, 2 );
    add_action( ‘woocommerce_before_single_product_summary’, ‘avia_close_image_div’, 20 );
    add_action( ‘woocommerce_before_single_product_summary’, ‘avia_add_summary_div’, 25 );
    add_action( ‘woocommerce_after_single_product_summary’, ‘avia_close_summary_div’, 3 );
    add_filter( ‘avf_product_sidebar_layout’, ‘avf_product_sidebar_layout_mod’, 5);
    }

    and added css to theme options
    .single-product .product {
    width: 68%;
    margin-right: 4%;
    clear: none;
    float: left;
    }

    #613532

    Hi pincushion!

    Please share the link to the page where we can inspect the element in question and help you resolve it :)

    Best regards,
    Vinay

    #613654

    Hi Vinay,
    I have been doing these edits to a sub-domain site which has all the same settings, plugins and version of enfold.

    I have provided you with details to view and login to the site below. Making edits via Appearance>editor>Enfold-child>functions.php will
    cause a fatal error so I have been making these via cpanel code editor.

    Cheers

    #613659

    Think I may have fixed it

    css for related products

    #top .product_column_4 .products .product {
        margin: 0 1% 1% 0;
        width: 24.25%;
    }

    Changed to

    #top .product_column_4 .products .product {
        margin: 0 1% 1% 0;
        width: 24%;
    }
    #613782

    Hi!

    Glad you figured it out!
    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
    For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)

    Regards,
    Yigit

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Single Product Page: Related products showing in 2 rows not 1’ is closed to new replies.