Skip Navigation

[Resolved] Removing Sidebar From Custom Post Types

This thread is resolved. Here is a description of the problem and solution.

Problem:
How can I remove the sidebar from my posts?

Solution:
Sidebars are not part of the_content and hence can only be removed from the Theme's Template used to display the_content.
That template will either deliver or call the header, footer, sidebar, menu and more.

Toolset does not allow to customize such templates, it only allows to customize the "Post Body" (the_content) part of those templates.
There are 2 exceptions to this:
- if you use a CPT read Theme as listed here: https://toolset.com/documentation/recommended-themes/ (apply here: https://toolset.com/documentation/beyond-pages-program/)
- or, if you use a Custom Theme that integrates Toolset Layouts (legacy) the_ddlayout() function to render the content.

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 2 replies, has 2 voices.

Last updated by danielC-17 5 years, 9 months ago.

Assisted by: Beda.

Author
Posts
#1203284
archive page.jpg
profile.jpg

Hi,

I've gone through all of the solutions in your support forums (that I could find).

Unfortunately, none of them solved my issue.

I have a custom post type "profile" and a custom post type "archive". Both of which are working correctly. The issue I am having though is that I can't remove the sidebar from the archives custom post type.

None of the theme's templates seems to deploy a sidebar in the usual way so none of the support solutions I've found line up with what I'm seeing.

Archive: I either want the sidebar to display properly so I can use it as a call to action on the archive page or be able to hide it and have the columns full width. I can't seem to do either at present.

Profile: I have the same sidebar with a CTA that works in this layout and the columns create by the custom post type work with this layout and stay gridded and responsive at any screen size.

I've uploaded a template single-partner-archives.php that appears to have hidden the sidebar on the profile page, but the columns are still 2/3rds visible and 1/3rd sidebar empty spacing. On the archive page the sidebar is pushed down and skewed.

See screengrabs for extra clarity.

The site is live, but this work is being done on a staging site installed in a subdirectory.

Happy to provice logins and SFTP access if needed.

Any help here is truly appreciated.

Regards

Dan

#1203596

Sidebars are not part of the_content and hence can only be removed from the Theme's Template used to display the_content.
That template will either deliver or call the header, footer, sidebar, menu and more.

Toolset does not allow to customize such templates, it only allows to customize the "Post Body" (the_content) part of those templates.
There are 2 exceptions to this:
- if you use a CPT read Theme as listed here: https://toolset.com/documentation/recommended-themes/ (apply here: https://toolset.com/documentation/beyond-pages-program/)
- or, if you use a Custom Theme that integrates Toolset Layouts (legacy) the_ddlayout() function to render the content.

#1203731

My issue is resolved now. Thank you!