In the members-only forum, a user asks:
Hi Sridhar,
Can you do a tutorial on how to enable Content/Sidebar layout in Remobile Pro? So Blog archive, and single Posts would have Content/Sidebar layout and Content/Sidebar layout would be an option for Pages?
- or if you’ve created a similar tutorial can you point me to it. -Thanks!
In this article we shall comment out the code for unregistering content-sidebar layout, forcing full width content and primary sidebar followed by conditionally (and automatically) applying content-sidebar layout to Posts page, archive pages, search pages and all the singular Posts in Remobile Pro.
Step 1
In Remobile Pro's functions.php
a) comment out or delete
genesis_unregister_layout( 'content-sidebar' );
and
unregister_sidebar( 'sidebar' );
and
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
b) add at the end:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
Thanks Sridhar! this works great for the blog, archives and single posts, but the sidebar wasn’t showing on Pages when I selected content/sidebar layout. I figured out a bit, so the sidebar is now showing up, but can you help me with the code to apply the .has-sidebar class to pages that are assigned the content/sidebar layout.
If you want to see what I mean go here: http://newmandi.com/sewp/leslies-test-page/
Thanks again.
I have updated the code in steps 1 and 2 to fix this problem.
Turns out, it’s not actually necessary to manually add the
has-sidebar
body class because all pages that has a content sidebar layout will automatically be assigned a usefulcontent-sidebar
body class.Excellent! Thanks for the quick solution.
Thanks for this tutorial! It worked fine, but on my site the menu icon on bigger screens does not disappear: http://imgur.com/a/AHR9b
Maybe the :after CSS needs to be changed as well?
.responsive-menu-icon::after {
background-color: #fff;
color: #333;
content: “\f333”;
display: block;
font: normal 24px/1 ‘dashicons’;
height: 32px;
margin: 0 auto;
padding-top: 8px;
width: 44px;}
One question more, how can I place that menu at the top before the header, like it is used on https://genesiswp.guide/ Thanks ahead!