Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1348222

    Hi,

    My Blog Sidebar Widget shows on desktop but doesn’t show on a mobile device. Ideally I’d like it to show at the bottom of the blog page on mobile.

    Information in the private area.

    Thanks

    #1348238

    Hey MikeTandySwag,

    Thank you for the inquiry.

    You can enable the sidebar on mobile view by toggling the Enfold > Sidebar Settings > Sidebar on Smartphones option, make sure to purge the cache afterwards.

    Best regards,
    Ismael

    #1348463

    Thank you! Is it possible to have the search feature above the blog posts on mobile?

    Thanks

    #1348473

    Hi,

    Yes, that should be possible. Try to add this code in the functions.php file.

    add_action("ava_after_main_title", function() {
      global $avia_config;
      if( is_page(123) ) {
        get_search_form();
      }
    }, 10);
    

    Make sure to replace the value 123 in the is_page function with the actual ID of the blog page.

    Best regards,
    Ismael

    #1348794

    Great thanks!

    How can I find the ID of the blog page when the blog is auto generated?

    Thanks!

    #1348823

    Hi,

    You should be able to use the slug as well: https://developer.wordpress.org/reference/functions/is_page/. You should be able to get the page ID in the URL, when you edit the page as well.

    Best regards,
    Rikard

    #1348846

    Okay that’s what I thought. I used that page id and the code didnt work.

    Any other thoughts?

    #1349069

    Just wanted to follow up to see if there is a way to get the search bar above the blog as the PHP code didn’t work

    #1349217

    Hi,
    Thank you for your patience, I removed the above function and added this script to move the search above the blog content on mobile:

    function custom_move_search_script() { ?>
        <script>
    (function($) {
    	var width = $(window).width();
    	if ( width <= 767) {
        $('#top.blog #search-3').css({ 'padding-bottom': '0'}).detach().insertBefore('.template-blog>main.content');
    	} else {}
     })(jQuery);
     </script>
        <?php
    }
    add_action('wp_footer', 'custom_move_search_script');

    Please clear your browser cache and check.

    Best regards,
    Mike

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