Sauter la navigation

[Résolu] Single Page Template

Ce fil est résolu. Voici une description du problème et la solution proposée.

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 Il y a 6 années et 9 mois. 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)

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Shane Il y a 6 années et 9 mois.

Assisté par: Shane.

Auteur
Publications
#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

Les langues: Anglais (English )

Fuseau horaire: 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