- This topic has 7 replies, 3 voices, and was last updated 8 years, 6 months ago by Hash.
- AuthorPosts
- April 30, 2016 at 9:24 pm #332Joshua TamParticipant
How can I remove the right sidebar and extend the content to full width for one particular page only? I manage to remove the right sidebar by adding the following php code into singlepage.php template. However, I’m having hard time extending the content to full width. Could you provide me the css code?
<?php if ( !( is_page(‘4201’) ) ) { ?>
<?php get_sidebar(); ?>
<?php } ?>April 30, 2016 at 10:28 pm #333HashKeymasterHi,
The theme has default feature to remove the sidebar.You should find this option below each page and post.
May 1, 2016 at 9:04 pm #337Joshua TamParticipantI only see the sidebar layout option below each post but not page. Is there any way to fix the problem mentioned previously?
May 1, 2016 at 11:37 pm #339HashKeymasterThe sidebar layout option should be visible in pages as well unless there is some code removing it.
Your code is correct to remove the sidebar from a single unique page. But there should be proper css as well. Assuming that you page id is 4201, here is the CSS code.
.page-id-41-4201 #primary{float:none; width:auto;}
May 6, 2016 at 4:13 pm #342RefleksusParticipantWhy doesnt the option “sidebar layout” remove the sidebar in the “about us section” on the homepage? the layout stays on the “left side + right sidebar” like u can see here thats my about us section on the front page (http://imagizer.imageshack.com/img923/6027/8Yupkv.png) on the other subsites where i only got some text it work perfectly tho
May 6, 2016 at 9:17 pm #343HashKeymasterHi,
This sidebar layout does not work with the home page about us section. This only work in the detail page.
Here is the CSS if you want to make the about us section full width.
.sq-about-sec{width:auto: float:none;} .sq-image-stack{display:none;}
May 7, 2016 at 6:41 pm #348RefleksusParticipantdoesnt work somehow i replaced that code in the style.css as u can see here (http://imagizer.imageshack.com/img921/6950/2iv8Kq.png) but its not working somehow
May 7, 2016 at 8:59 pm #349HashKeymasterYou should add it at the bottom of the file. It should work fine.
- AuthorPosts
- You must be logged in to reply to this topic.