Forum Replies Created
-
AuthorPosts
-
davistechMember
@braddalton thank you very much! That looks like a very nice plugin, but it hasn't been updated for a year. I'll do some testing starting from there 🙂
davistechMemberA kind soul posted the solution on Stackoverflow ^_^
<?php remove_action( 'genesis_loop', 'genesis_do_loop' ); // This is how you remove the sidebar in a page. remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); // And this is the hooks before content and sidebar. // genesis_before_content // In your case let's use this codes in functions.php remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); add_action( 'genesis_before_content', function(){ echo '<aside class="sidebar sidebar-primary widget-area" role="complementary" itemscope="itemscope" itemtype="http://schema.org/WPSideBar">'; echo genesis_do_sidebar(); echo '</aside>'; }, 2 ); ?>
davistechMemberI solved it quickly with Flexbox by adding this CSS to the responsive collapse media query:
.content-sidebar-wrap {
display: flex;
flex-direction: column;
}.content {
order: 2;
}Would still like to know how to change it with hooks. This solution is a cover-up, not a real fix.
davistechMemberGood thinking! However I would have to spend a good amount of time on the CSS to fit the new layout. I was hoping it would be solved by 4 lines of code in the functions.php. I'm going to look into Flexbox and if that doesn't work so great I will go with your solution. Thank you!
If anyone else knows how to solve this within the functions.php file, please let me know.
-
AuthorPosts