Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #736105

    I have read many threads without a solution. I need to have the sidebar above the content on mobile devices. I have all sidebars set to left but still shows below the content. I have the checkbox marked to show sidebars on mobile.

    Thank you!

    • This topic was modified 7 years, 2 months ago by vegasft.
    #737622

    Hi vegasft!

    Thank you for using Enfold.

    Please add code in the functions.php file.

    add_action('wp_footer', 'ava_new_custom_script');
    function ava_new_custom_script(){
    ?>
    <script type="text/javascript">
    (function($) {
    	function a() {
    		if( $(window).innerWidth() >= 768) return;
    		$('.sidebar').insertBefore('.av-content-small');
    	}
    
    	$(window).load(function() {
    		a();
    	});
    })(jQuery);
    </script>
    <?php
    }

    Cheers!
    Ismael

    #739352

    Hi,

    I have exactly the same issue. I have all sidebars set to left but still shows below the content. I have the checkbox marked to show sidebars on mobile.

    I have pasted the code on the bottom of functions.php but the sidebar is still being displayed below the content
    Can you please advise?

    Thank you,

    #739524

    Hi chrrok. Not sure as the above worked for me…

    #739626

    Hi vegasft,

    Ok, I’ve checked that on shrinked desktop browser and it didn’t work.
    However when I open the website on mobile, then it resolves correctly.

    #740978

    Hi @chrrok,

    Could you post a link to the site in question so that we can take a closer look please?

    Best regards,
    Rikard

    #896676

    Awesome! Worked!:
    dolanddesign.com

    thanks – love this theme

    #896714

    Hey dolandr,

    Did you need help for the site posted above?

    Best regards,
    Jordan Shannon

    #947407

    Hello Support,

    Thanks for the above solution to show sidebar above the main content.

    What modification can i make to the above code for the sidebar to show above the content for just a particular page (woocommerce shop page)

    Thank you

    #947481

    Hi,

    Please provide a link to the page that you want this script to run on so we can see the ID.

    Best regards,
    Jordan Shannon

    #947536

    Hello Jordan
    Thanks for the swift respond. Below is the page
    http://test.benurmal.com/book/shop/

    Please note that only this page should have the sidebar above content while other pages sidebar remain below main content.

    Thank you.

    #948090

    Hello Support,

    Any update on the above matter?

    Thank you.

    #948474

    Hello Support,

    I’m yet to get any feedback on my above request.

    I will appreciate a feedback.

    Thanks

    #948503

    Hi Israel Imasuen,

    Did you use the code given earlier in this thread?

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Please refrain from bumping or replying to your own thread because it gets pushed back to the end of the queue and moderators won’t be able to provide a response immediately. Please be patient while we go through the rest of the queue. Thank you for your understanding.

    Best regards,
    Victoria

    #948528

    Hello Support,

    Thanks for the information. Below is the credentials requested.

    I look forward to your feedback.

    #948565

    My apologies the site url is wrong

    #949050

    Hi Israel Imasuen ,

    There was an error in your function. I fixed it. Please check.

    Best regards,
    Victoria

    #949096

    Hello Support,
    Thanks for the update but what i wanted is for the shop page only to have it sidebar above main content while other pages sidebar remain below content. At the moment all pages are having their sidebar above content.

    Kindly review.

    Thanks

    #949169

    Hello Support,

    The sidebar is meant for mobile view only but right now it’s on top on desktop view.

    Kindly review

    #949410

    Hi Israel Imasuen,

    Please check now.

    Best regards,
    Victoria

    #949734

    Hello Victoria,

    I’m indeed grateful for the assistance, thank you so much.

    Also, just thinking if it’s a good idea for the solution to be pasted here so that others that might want similar support doesn’t have to create a new ticket or border support for already available solutions.

    Well, you might want to say that such support is only meant for those that actually paid for the theme, I agree with that and i think the solutions can be under lock for those that have login to view it. (just my thought)

    Thanks once more.

    #949874

    Hi Israel Imasuen,

    Glad you got it working for you! :)

    Please, feel free to post the solution here, if you deem so necessary.

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #980137

    Hello Israel Imasuen/Support!
    It would be kind if you could post or tell the solution for moving the sidebar on top of mobile devices only for shop pages.

    Thank you!
    Kind regards
    Bine

    #980356

    Hi,

    Please check the documentation for code snippets to move the sidebar on top.

    NOTE: The code can be used to move the default theme sidebar on top but not for the sidebars built with Advanced Layout Builder or other plugins.

    To make the code work only for the shop section please add a shop page class before the CSS selectors.

    Best regards,
    Vinay

    #981758

    Hello Sabsasa,

    Kindly let me know if you are still in need of the snippet to put the sidebar above for the shop page.

    Thank you.

    #982113
    This reply has been marked as private.
Viewing 26 posts - 1 through 26 (of 26 total)
  • You must be logged in to reply to this topic.