Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1195497

    Hi,
    I have an Enfold+ woocommerce website.
    On a product page when you open on mobile you see the sidebar first and you have make too much scroll to reach the product description. I tried some solutions from the forum, but did not work.
    What I am trying to do is move the description right after the product image and then the sidebar.

    Thanks!

    #1198024

    Hey Cherryadvertising,

    Please have a look at the following thread:

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1200020

    Hi, the suggested solution is not working.

    #1200967

    Hi,
    Sorry for the late reply, to move the sidebar below the description for products on mobile, Try adding this code to the end of your functions.php file in Appearance > Editor:

    function custom_script(){
      ?>
      <script>
    (function($) {
      $(document).ready(function(){
      	var width = $(window).width()
      	if ($(width <= 767)) {
         $('#top.single-product .sidebar').detach().insertAfter('#top.single-product .single-product-summary');
      	} else{}
      });
     })(jQuery);
     </script>
    <?php
    }
    add_action('wp_footer', 'custom_script');

    Then clear your browser cache and check.

    Best regards,
    Mike

    #1201714

    Hi,
    thanks, works perfect.
    But now the change happens also on desktop too.
    Can we make it so it is only reflected on mobile?

    Thanks!

    #1202438

    Hi Cherryadvertising,

    This line:

    
    if ($(width <= 767)) {
    

    should be

    
    if (width <= 767) {
    

    Please it like that.
    Best regards,
    Victoria

    #1203480

    That works :-)
    Thanks!

    #1203570

    Hi,
    Thanks @Victoria, @Cherryadvertising glad this is helping, unless there is anything else we can help with on this issue, shall we close this then?

    Best regards,
    Mike

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