Tagged: blog sidebar, Portfolio + sidebar
Hi, I would like to display the blog sidebar on all blog posts, but hide it on all portfolio posts.
Could you let me know how to do this?
Many thanks!
Paul
Hey goorbital!
You can select to use a sidebar or no sidebar whenever you edit the post. It’s in the “Layout Settings” on the right hand side.
Regards,
Elliott
Hi Elliot, I currently have 50+ portfolio items. Is there an easier way to hide the sidebar on all of them through CSS or the functions file?
Hi,
I’m not sure but send us a link to the site in question and we’ll have a closer look, I think your safest bet would be to do it manually though.
Best regards,
Rikard
Hi Rikard, would it be possible to remove the sidebar from one of the theme’s portfolio file code? I tried commenting out the sidebar in the single-portfolio.php page, but it had no effect.
Thanks,
Paul
Hi!
I loaded your portfolio item and I can not locate any sidebar been around.
Have you managed to remove it?
Best regards,
Basilis
Hi Basilis,
I was not able to remove the sidebar.
Hi,
You could hide it with CSS but then you would have to find all the page ID’s for the pages and that would probably take more time than actually editing the sidebar setting, if I was in your position I would edit the posts instead of using CSS.
Regards,
Rikard
This did the job for me. First bit of code to hide on single portfolio by targeting body.single-portfolio. 2nd bit to adjust the main area to be full width rather than 73%. And also remove right border.
body.single-portfolio .sidebar {
display: none !important;
}
body.single-portfolio .container .av-content-small.units {
width: 100% !important;
border-right: none !important;
}