Tagged: x
-
AuthorPosts
-
November 27, 2016 at 5:23 pm #1272489
PhillipParticipantHi. Is there any way to disable the sidebar on certain pages in Renew 4?
November 27, 2016 at 7:50 pm #1272638
LelyModeratorHi Philip,
To help you better, please share the URL of the pages where you want to disable sidebar. There are different ways to do that depending on the page. For example, if it’s a normal page that you have created via Pages > Add new, we can disable sidebar by using Layout-Fullwidth page template. On other pages like blog index page, archive pages or single post page, we need some customization using a child theme to achieve this. Please clarify so we can give you detailed recommendation.
Cheers!
November 27, 2016 at 10:34 pm #1272714
PhillipParticipantWell what I’m wanting to do is disable the sidebar for ALL pages. However, I want to display the sidebar on posts.
November 27, 2016 at 10:55 pm #1272730
LelyModeratorHi Phillip,
In that case, make sure that you have selected FULLWIDTH on Appearance > Customize > Layout and Design > Content Layout: Choose Fullwidth. That will disable sidebar on the entire site. Then we have to add the following code on your child theme’s functions.php file to add sidebar on single post only:
function single_post_sidebar($contents) { if ( is_single() ) { $contents = 'content-sidebar'; } return $contents; } add_filter('x_option_x_layout_content', 'single_post_sidebar');Hope this helps.
November 27, 2016 at 11:15 pm #1272747
PhillipParticipantOk. So if I apply that code to the functions.php file, I can still create unique sidebars through Appearance > Sidebars as if I had them enabled right?
November 27, 2016 at 11:45 pm #1272766
Rue NelModeratorHello There,
The code must be added in your child theme’s functions.php file so that it will not be overwritten when there is an X updates. And yes you can still create sidebars. You should be be assigning the sidebar to the specific posts or group of posts though.
Please let us know how it goes.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1272489 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
