Viewing 28 results - 1 through 28 (of 28 total)
  • Author
    Search Results
  • #1374540

    Hi,

    I realise this is an old post but for the benefit of anyone who has Googled this topic and are using Ismael’s first solution for a right sidebar (post-1162484), there’s a slight code tweak required if you find that the default sidebar is being loaded instead of your ‘Single Product Pages’ sidebar:

    ‘global $avia_config;’ must be added to the ‘avia_add_sidebar()’ function. So revised code is as follows:

    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() {
      global $avia_config;
      echo "</div>
    ";
    }
    
    function avia_add_sidebar() {
      global $avia_config;
      if(is_product()) {
        $avia_config['currently_viewing'] = 'shop_single';
        get_sidebar();
      }
    }

    Ismael’s CSS code remains unchanged:

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

    Hi,

    There was a minor syntax error in the snippet. Please try it again.

    /* zijbalk op productpagina */
    function ava534345953_init() {
    	add_action( 'woocommerce_after_single_product_summary', 'avia_add_sidebar', 25);
    	add_action( 'woocommerce_after_single_product_summary', 'avia_close_image_div_mod', 20);
    	add_action( 'woocommerce_before_single_product_summary', 'avia_open_image_div_mod', 1 );
    }
    
    function avia_open_image_div_mod() {
    	echo "<div class='product-main-container'>";
    }
    
    function avia_close_image_div_mod() {
    	echo "</div>";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    		$avia_config['currently_viewing'] = "shop_single";
    		get_sidebar();
    	}
    }
    add_action('init','ava534345953_init', 50);
    

    Do not forget to add the css code. You may need to toggle or temporarily disable the Enfold > Performance > File Compression settings afterwards.

    Best regards,
    Ismael

    #1296033

    Hi,

    Thank you for following up.

    We updated the code in the functions.php file.

    
    /* zijbalk op productpagina */
    function ava534345953_init() {
    	add_action( 'woocommerce_after_single_product_summary', 'avia_add_sidebar', 25);
    	add_action( 'woocommerce_after_single_product_summary', 'avia_close_image_div_mod', 20);
    	add_action( 'woocommerce_before_single_product_summary', 'avia_open_image_div_mod', 1 );
    }
    
    function avia_open_image_div_mod() {
    	echo "<div class='product-main-container'>";
    }
    
    function avia_close_image_div_mod() {
    	echo "</div>";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    		$avia_config['currently_viewing'] = "shop_single";
    		get_sidebar();
    	}
    }
    add_action('init','ava534345953_init', 50);
    

    And use this css code instead.

    .product-main-container {
        width: 63%;
        float: right;
        margin-left: 50px;
    }
    
    .product-main-container::after {
    	content: '';
    	display: table;
    	clear: both;
    }
    
    .product-main-container .single-product-main-image, .product-main-container .single-product-summary  {
    	width: 100%;
    }
    
    #top #main .sidebar {
        border-left: 0;
        border-right-style: solid;
        border-right-width: 1px;
        margin-left: 0;
        margin-right: 50px;
        padding-right: 50px;
    }
    

    The widget area is now located in the sidebar.

    Best regards,
    Ismael

    Hi,

    Thank you for the update.

    Try to replace the snippet in the functions.php with the following code.

    function ava534345953_init() {
    	add_action( 'woocommerce_after_single_product_summary', 'avia_add_sidebar', 25);
    	add_action( 'woocommerce_after_single_product_summary', 'avia_close_image_div_mod', 20);
    	add_action( 'woocommerce_before_single_product_summary', 'avia_open_image_div_mod', 1 );
    }
    
    function avia_open_image_div_mod() {
    	echo "<div class='product-main-container'>";
    }
    
    function avia_close_image_div() {
    	echo "</div>";
    }
    
    function avia_close_image_div_mod() {
    	echo "</div>";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    		$avia_config['currently_viewing'] = "shop_single";
    		get_sidebar();
    	}
    }
    add_action('init','ava534345953_init', 50);
    

    Then use this css code.

    .product-main-container {
    	width: 70%;
    	float: right;
    }
    
    .product-main-container::after {
    	content: '';
    	display: table;
    	clear: both;
    }
    
    .product-main-container .single-product-main-image, .product-main-container .single-product-summary  {
    	width: 100%;
    }
    
    #top #main .sidebar {
            border-left: 0;
    	border-right-style: solid;
    	border-right-width: 1px;
    	margin-left: 0;
    }

    Or post the FTP and WP details so that we could implement the changes.

    Best regards,
    Ismael

    #1246689

    Hi,

    That should be possible as well. We could wrap the product image and the description container inside another div and increase the containers’ width.

    Please replace the snippet with the following code.

    function ava534345953_init() {
    	add_action( 'woocommerce_after_single_product_summary', 'avia_add_sidebar', 25);
    	add_action( 'woocommerce_after_single_product_summary', 'avia_close_image_div_mod', 20);
    	add_action( 'woocommerce_before_single_product_summary', 'avia_open_image_div_mod', 1 );
    }
    
    function avia_open_image_div_mod() {
    	echo "<div class='product-main-container'>";
    }
    
    function avia_close_image_div() {
    	echo "</div>";
    }
    
    function avia_close_image_div_mod() {
    	echo "</div>";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    		$avia_config['currently_viewing'] = "shop_single";
    		get_sidebar();
    	}
    }
    add_action('init','ava534345953_init', 50);
    

    And use this css code instead.

    .product-main-container {
    	width: 70%;
    	float: left;
    }
    
    .product-main-container::after {
    	content: '';
    	display: table;
    	clear: both;
    }
    
    .product-main-container .single-product-main-image, .product-main-container .single-product-summary  {
    	width: 100%;
    }
    

    keyword: product sidebar full width image description

    Best regards,
    Ismael

    #1245585

    Hey PT0060,
    Sorry for the late reply, to add a right sidebar to a product page try adding this code to the end of your functions.php file in Appearance > Editor:

    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() {
    	global $avia_config;
    	echo "</div>
    ";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    }

    and this css to your 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%;
    }

    You may need to adjust the css to suit.

    Best regards,
    Mike

    #1218292

    In reply to: Enfold Shop template

    Hey Cocoa,
    To add a right sidebar to a woocommerce product page, please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:

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

    Then add this code to the end of your functions.php file in Appearance > Editor:

    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() {
    	global $avia_config;
    	echo "</div>
    ";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    }

    To add additional Avia Builder elements to a product page you will need to build the product page with the builder.

    Best regards,
    Mike

    #1166214

    Hi,
    Sorry for the late reply, we do have some code that will allow you to have a right sidebar on a single product page, but it works best if your page is full width.
    2019-12-15-191113
    If you would like to try it out, Please add this code in the General Styling > Quick CSS field:

    /*add right sidebar to woo product page*/
    .single-product-main-image {
        width: 25%;
    }
    
    .single-product-summary {
        overflow: hidden;
        width: 40%;
        float: left;
        margin-right: 5%;
    }
    
    .single-product .sidebar {
        width: 35%;
    }

    Then add this code to the end of your functions.php file in Appearance > Editor:

    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() {
    	global $avia_config;
    	echo "</div>
    ";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    }

    Best regards,
    Mike

    #1162484

    Hi,

    Thank you for the update.

    We added this snippet in the functions.php file to adjust the structure of the product page.

    
    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() {
    	global $avia_config;
    	echo "</div>
    ";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    }

    And this css code in the style.css file to alter the width of the containers.

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

    Best regards,
    Ismael

    #1155239

    Hey HeeHA,
    Sorry for the late reply, please try this solution:
    Try adding this code to the end of your functions.php file in Appearance > Editor:

    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() {
    	global $avia_config;
    	echo "</div>
    ";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    }

    Then add this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:

    //add right sidebar to woo product page
    .single-product-main-image {
        width: 25%;
    }
    
    .single-product-summary {
        overflow: hidden;
        width: 45%;
        float: left;
        margin-right: 5%;
    }
    
    .single-product .sidebar {
        width: 25%;
    }

    Before:
    2019-11-09-132840
    After:
    2019-11-09-132613

    Best regards,
    Mike

    #1126549

    Hi,
    Sorry for the late reply, Try adding this code to the end of your functions.php file in Appearance > Editor:

    //add right sidebar to woo product page
    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() {
    	global $avia_config;
    	echo "</div>
    ";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    }

    Then add this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:

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

    2019-08-10-182654

    Best regards,
    Mike

    #943099

    Hi,
    I adjusted your css to this:

    /* single product sidebar left */
    .single-product-main-image {
        width: 25%;
    }
    .single-product-summary {
        overflow: hidden;
        width: 45%;
        float: right;
        margin-right: 5%;
    }
    .single-product-main-image {
    	float: right;
    	margin-right: 0px !important; 
    }
    .single-product .sidebar {
        width: 25%;
    	 float: left;
    	border-left-style: none !important; 
        border-left-width: 0px !important; 
    }
    .single-product .inner_sidebar {
        margin-left: 0px !important; 
    	margin-right: 50px !important; 
    }
    

    Please check.
    For future readers, this was the function to create a single product sidebar:

    // single product sidebar
    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();
    	}
    }

    Best regards,
    Mike

    #942160

    Thank you again, but I have another question,
    I have see “how to add the sidebat on the single product page” the question
    Is very good to work, but how to let the sidebar on the left side, because the solution is on the right side
    Thank you very much

    And this ode in the function.php
    // 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();
    }
    }

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

    And this css code in the Quick CSS field:
    .single-product-summary {
    overflow: hidden;
    width: 45%;
    float: left;
    margin-right: 5%;
    }

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

    #831080

    In reply to: single image problem

    Hi!

    I added following code to Functions.php file in Appearance > Editor

    // 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() {
    	global $avia_config;
    	echo "</div>
    ";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    }

    And added a test widget in single product widget area for testing and confirmed it does show up fine. Please see your product below.

    Also, i noticed that you have made CSS changes on image and description widths. You can remove them and refer to this post – https://kriesi.at/support/topic/sidebar-rechts-single-page/#post-580220 and use that custom CSS instead

    Best regards,
    Yigit

    #830001
    info224
    Participant

    Hi

    I’m trying to move the sidebar widget to the right of the image.
    I used 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() {
    global $avia_config;
    echo “</div>
    “;
    }

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

    Fatal error: Cannot redeclare avia_close_image_div() (previously declared in /home/dh_w9ptc8/xxx.co.uk/wp-content/themes/enfold/config-woocommerce/config.php:1231) in /home/dh_w9ptc8/xxx.co.uk/wp-content/themes/enfold/functions-enfold.php on line 1908

    Thanks

    #818751

    Hi ColinWalton,

    Function with adding the action has to be only one. Sorry, if I wasn’t clear enough.
    Remove this one:

    
    function ava534345953_init() {
    	add_action( 'woocommerce_after_single_product_summary', 'avia_add_sidebar', 25);
    }
    

    So you should get this:

    
    // fixes the sidebar to add correctly to PRODUCTS PAGES
    add_action('init','ava534345953_init', 50);
    
    function avia_close_image_div() {
    	echo "</div>";
    }
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    
    }
    function ava534345953_init() {
    	add_action( 'woocommerce_before_single_product', 'avia_add_sidebar', 25);
    }
    

    Best regards,
    Victoria

    #818139

    Hiya, as I said, I have already tried that. If I put if after THE PREVIOUS CODE Victoria said to keep in – all I get is a blank screen.

    This is the code I have already:

    // fixes the sidebar to add correctly to PRODUCTS PAGES
    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();
    	}
    
    }

    If I add THIS afterwards:…

    function ava534345953_init() {
    	add_action( 'woocommerce_before_single_product', 'avia_add_sidebar', 25);
    }

    I end up with a blank screen. I think the various functions are fighting against each other somehow?

    TO SUM UP – THIS IS THE CODE AS I HAVE IT NOW…

    // fixes the sidebar to add correctly to PRODUCTS PAGES
    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();
    	}
    
    }
    
    function ava534345953_init() {
    	add_action( 'woocommerce_before_single_product', 'avia_add_sidebar', 25);
    }
    #817750

    Hi ColinWalton,

    You could try a different action

    
    function ava534345953_init() {
    	add_action( 'woocommerce_before_single_product', 'avia_add_sidebar', 25);
    }
    

    and adjust float to right, if left does not work for you. (Keep all the code form before)

    Best regards,
    Victoria

    #806718

    Hi,

    The modification above is obsolete Please remove it then add the following code in the functions.php file:

    // 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() {
    	global $avia_config;
    	echo "</div>
    ";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    }

    In the Quick CSS field, add the following css code.

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

    Related thread: https://kriesi.at/support/topic/sidebar-rechts-single-page/#post-580220

    Best regards,
    Ismael

    And with that I only appear in the widget sidebar pages not in Single Product Pages widget area and not all that I have if they appear on my home page, in the product only some appear me …
    Thank you

    The code that I have put is the one you sent in the previous message with a link
    functions.php file:

    // 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();
    }
    }

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

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

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

    #730198

    Hi,

    Thank you for the screenshot.

    Please add the following code in the functions.php file.

    // 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() {
    	global $avia_config;
    	echo "</div>";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    }
    
    add_action('wp_footer', 'ava_custom_script');
    function ava_custom_script(){
    ?>
    <script type="text/javascript">
    (function($) {
    	function a() {
    		$('.single .product').prepend('<div class="single-product-main-container"></div>');
    		$('.single-product-main-image, .single-product-summary').prependTo('.single-product-main-container');
        }
    
    	a();
    })(jQuery);
    </script>
    <?php
    }

    And this code in the Quick CSS field.

    .single-product-main-container {
        width: 70%;
       float: right;
       margin-left: 5%
    }
    
    .single-product-main-image {
        width: 45%;
        float: left;
        margin-right: 0;
    }
    
    .single-product-summary {
        overflow: hidden;
        width: 45%;
        float: left;
        margin-left: 5%;
    }
    
    .single-product .sidebar {
        width: 25%;
    }

    Best regards,
    Ismael

    #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;
    }

    #698621

    Hi!

    Please remove the sidebar modifications in the functions.php and Quick CSS field. Add this code in the functions.php.

    // adjust settings on init
    add_action('init','ava534345953_init', 50);
    function ava534345953_init() {
    	add_action( 'woocommerce_after_single_product_summary', 'avia_add_sidebar', 25);
           remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
    	remove_action(    'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 1 );
    	add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 20 );
    }
    
    function avia_close_image_div() {
    	echo "</div>";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    }

    And this code in the Quick CSS field:

    .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;
    }

    Best regards,
    Ismael

    #689125

    Hi Andy,

    since moving the sidebar to the right is done via function.php, this issue cannot happen in another theme.

    Andy, ich schreibe immer auf Englisch, damit ander etwas von unserer Konversation haben, aber nur ganz kurz, zur bessere Klärung: Das oben gezeigte Snippet stammt von Ismael und wurde schon öfter im Forum empfohlen https://kriesi.at/support/search/ava534345953/?avia_filter_search=yes&avia_search_forums=all&avia_search_dates=all&avia_search_include=no
    Aber die definition der Sidebar

    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}

    scheint dabei nicht zu klappen, denn es werden eben nicht die Widgets aus schop_single genommen. Ich meine schon mal etwas diesbezüglich hier im Form gelesen zu haben, finde es aber nicht mehr und damit auch nicht die evtl. gefundene Lösung. Herzlichen Gruß, Michael

    #686271

    Oh, before you ask regarding issue 1. – I have moved the sidebar to the right, but I did it according to the available instructions and it should be correct and should work.

    //BEGIN PRODUCT WIDGET AREA IN THE RIGHT SIDEBAR
    // 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();
    	}
    }
    //END PRODUCT WIDGET AREA IN THE RIGHT SIDEBAR
    #608654

    Hi!

    Please create a child theme: http://kriesi.at/documentation/enfold/using-a-child-theme/

    Create a functions.php file inside the child theme then enter the suggested codes:

    function avia_add_sidebar() {
    	global $avia_config;
    	if(is_product()) {
    		$back = $_SERVER['HTTP_REFERER'];
    		if(isset($back) && $back != "") echo '<a href="'.$back.'" rel="nofollow">Go back</a>';
    		$avia_config['currently_viewing'] = "shop_single";
    		get_sidebar();
    	}
    }
    
    // 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>";
    }

    Regards,
    Ismael

    #586630

    Hey!

    Please use this in the functions.php file:

    // adjust settings on init
    add_action('init','ava534345953_init', 50);
    function ava534345953_init() {
    	if(is_category(5405)) {
    		remove_filter('pre_get_posts','ksuce_exclude_categories');
    	}
    }

    Regards,
    Ismael

    #582932
    MATTIA
    Participant

    Hallo Josue
    Hallo Ismael,

    I just need a please help.

    Ismael has integrated me following code in the “funktion.php”, works great!

    // 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() {
    global $avia_config;
    echo “</div>”;
    }

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

    and in the CSS this code:

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

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

    If I insets code of Josue, a 500 server error appears:

    function avia_close_image_div()
    {
    global $avia_config;
    if(is_product()) {
    $back =$_SERVER[‘HTTP_REFERER’];
    if((isset($back) && $back !=”)) echo ‘Go back‘;
    $avia_config[‘currently_viewing’] = “shop_single”;
    get_sidebar();
    }
    echo “</div>”;
    }

    Could you adjust the final code, thank you.

    The button must not be placed strictly under the single product image.
    The main thing customers have the option of having to go to the previous page.

    Many thanks.

    greeting
    Jessica

Viewing 28 results - 1 through 28 (of 28 total)