Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #427004

    Hi there,

    As you can see on this site, I have the nested subpages in the left sidebar. In mobile view it goes to the bottom: http://test3.jacobsenweb.dk/proev_tango/

    I’m also testing the BE Subpages Widget. In mobile view it goes to the top.

    Is it possible to display the left sidebar nested subpages on top of the page (under main menu) on mobile view?

    Best regards

    #427238

    Hey mariajoensen!

    Thank you for using Enfold.

    Add this to the functions.php file:

    add_action( 'ava_after_main_container', 'ava_after_main_container_mod', 10, 2 );
    function ava_after_main_container_mod() {
    	echo '<div class="main_color container_wrap sidebar_right_mobile"><div class="container"><aside class="sidebar sidebar_right smartphones_sidebar_active alpha units" role="complementary" itemscope="itemscope" itemtype="https://schema.org/WPSideBar"><div class="inner_sidebar">';
    	avia_sidebar_menu(true);
    	echo '</div></div></div></div>';
    }

    After that, add this to the Quick CSS field:

    @media only screen and (min-width: 768px) {
      /* Add your Desktop Styles here */
    	.sidebar_right_mobile { display: none; }
    }

    Best regards,
    Ismael

    #427632
    This reply has been marked as private.
    #428138

    Hey!

    I’m sorry but what do you mean by “first-menu-item”? Please provide a screenshot. I modified the code above and it seems to be working now on all pages:

    add_action( 'ava_after_main_container', 'ava_after_main_container_mod', 10, 2 );
    function ava_after_main_container_mod() {
    	global $post;
    	if(!empty($post->post_parent)) {
    	echo '<div class="main_color container_wrap sidebar_right_mobile"><div class="container"><aside class="sidebar sidebar_right smartphones_sidebar_active alpha units" role="complementary" itemscope="itemscope" itemtype="https://schema.org/WPSideBar"><div class="inner_sidebar">';	
    	avia_sidebar_menu(true);
    	echo '</div></div></div>';
    	}
    }

    Don’t forget to add the custom css above in the Quick CSS field.

    Cheers!
    Ismael

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