-
AuthorPosts
-
March 23, 2020 at 4:05 pm #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!
March 26, 2020 at 2:04 pm #1198024Hey Cherryadvertising,
Please have a look at the following thread:
If you need further assistance please let us know.
Best regards,
VictoriaApril 2, 2020 at 8:41 am #1200020Hi, the suggested solution is not working.
April 5, 2020 at 2:37 pm #1200967Hi,
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,
MikeApril 7, 2020 at 10:20 pm #1201714Hi,
thanks, works perfect.
But now the change happens also on desktop too.
Can we make it so it is only reflected on mobile?Thanks!
April 9, 2020 at 6:49 pm #1202438Hi Cherryadvertising,
This line:
if ($(width <= 767)) {should be
if (width <= 767) {Please it like that.
Best regards,
VictoriaApril 14, 2020 at 8:57 am #1203480That works :-)
Thanks!April 14, 2020 at 1:25 pm #1203570Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.
