Skip Navigation

[Résolu] Content template not displayed on front

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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Ce sujet contient 7 réponses, a 2 voix.

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

Assisté par: Nigel.

Auteur
Publications
#620836

Hello, I am trying to create a content template for CPT... I can make it with WP Bakery as I want, but nothing display on the front-end.

I feel that it is the layout of the theme that takes over. My theme is ZEPHYR lien caché.

I Have no problem with the archives view I created, but with single page... nothing display on front.

Page with integrated view works fine ---> lien caché
Single page don't works -----> lien caché

There is login to see pages.... how could send it you in private?

I don't have installed child theme because I tought I don't need it, but I can do it if it's necessary for single page content template display.

Could you help me please?

#620937

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

Hi Sandra

I took a look at your theme and it is non-standard, meaning it doesn't output the post content (which is the part a Toolset template will replace) using the WordPress function the_content().

(Theme support for Content Templates is described here: https://toolset.com/documentation/user-guides/editing-view-templates/theme-support-for-content-templates/)

I might need to take a deeper look at the theme to see if it is possible to add support for Content Templates, but before I do, I note that the theme checks whether the post type is supported, so I guess there is a theme option where you can add post types.

Can you make sure you have done that, and let me know if that makes any difference?

If not I'll dig deeper.

I'm marking your next reply as private so that you can give me the username and password to be able to see the front end of your site (you can ignore the template where it asks for your admin and FTP credentials as I have those already).

#620939
Capture d’écran 2018-03-01 à 13.50.54.png

Yes, there is option in the theme setting to support CPT (see screenshot in attachment)

#620995

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

Hi Sandra

I made a copy of your site for testing and I used the debugging option on the page Toolset > Settings > Front-end Content under Theme Support for Content Templates, which detected the function us_load_template as a possible option.

I added that in the settings (see screenshot) and it appears to have worked—although I was using a stripped down version of your site with only the essential plugins activated. Can you try the same and see if it works on your online site?

Note that you should de-activate Layouts. Layouts is Toolset's page-builder. You are already using the WP Bakery page builder and it is not recommended that you use two on the same site.

In any case, the ability to add a custom function to provide theme support only works for Views Content Templates, not for Layouts.

#621041

Sorry but I don't understand... (I don't really speak english, I'm french!).
What should I do?
Did you disable a module on the online site?

#621053

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

Screen Shot 2018-03-01 at 15.16.49.png

When I was looking at your online site and checking the templates, I saw that you had created both a Content Template and a Template Layout for the programme posts.

While testing it I might have unassigned the Template Layout, but you need to do that anyway, you need to stop using Layouts and only use Content Templates, which you can design with WP Bakery page builder if required.

So, on your site, make sure Layouts plugin is deactivated, and then add the function us_load_template at Toolset > Settings > Front-end Content under Theme Support for Content Templates.

Sorry, I didn't attach the screenshot. Here it is.

#621057

I try to add the function us_load_template, and now I can see my design on CPT ---> lien caché (It's not finished). But I have lost all my pages content (WordPress pages) ---> lien caché (for exemple)... Should I copy the layout I did with WP Bakery on my pages and paste it on your plugin to create pages again ? knowing that I have already created many pages... It's not a good news for me...

#621271
Capture d’écran 2018-03-02 à 10.03.23.png

Hi, I found the solution... I just had to select "none" for the content template of the pages.... witch was on an existing template by default. Thanks!