Skip Navigation

[Resolved] Single Page Template

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

Problem:
The issue here is that the user's theme is generating a sidebar on his custom posts.

Solution:
I suspect that this has to do with the theme's template file.

Normally your theme has a sidebar() function that renders the sidebar. What you can do is to create a custom php template for your custom post type and remove the sidebar(); function from that file.

Naturally you will just create a copy of the single.php file and create your custom template with the name single-{cpt_slug}.php

This support ticket is created 6 years, 7 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Shane 6 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#697436

When I create a normal page, I can select Templates like left dsidebar or full width.

I created a page "full width" -> working fine.

At the template for the single item, the left sidebar is showing again and I cannot find anytwhere to define that I wand to have there "full-width" too.

In the end, I will need to creat the template via php or is there any option for it?

#700318

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Stefan,

Thank you for contacting our support forum.

I suspect that this has to do with the theme's template file.

Normally your theme has a sidebar() function that renders the sidebar. What you can do is to create a custom php template for your custom post type and remove the sidebar(); function from that file.

Naturally you will just create a copy of the single.php file and create your custom template with the name single-{cpt_slug}.php

Please let me know if this helps.
Thanks,
Shane