Passer la navigation

[Résolu] Multiple templates for product

This support ticket is created Il y a 4 years, 9 months. 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 -

Fuseau horaire du supporter : America/Jamaica (GMT-05:00)

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

Dernière mise à jour par lalK Il y a 4 years, 9 months.

Assisté par: Shane.

Auteur
Publications
#2160141

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

It would appear that the posts are being displayed with the correct content template.

Check this post here
lien caché

The post above is assigned to the Taught Courses product category and is using the Weekend Schools content template

However this one below
lien caché

Is not assigned to Taught courses and has the product template assigned so it would appear to be working as intended.

Thanks,
Shane

#2160157

lien caché is *listed* as using the Weekend School template. But it isn't. It is actually using the product template.

This is the original problem but using a different page and an example.

This is the Weekend School Template: lien caché with the condition thatr i is to be used on products with the product category Taught Courses (slug = "taught")

This is the default product template created in Toolset. lien caché
It has no conditions and works fine on all the products. Unfortunately it also applies to the products with the category Taught Courses.

So the condition - apply template 28640 to products with category == taught - is being ignored

#2160185

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hello,

This should be working now. I was interpreting the ticket the other way around but the issue should now be resolved. What I did was to enable the content template debugging to see what was happening when the content templates were being applied and set the correct filters for the template to be applied.

Please check now and let me know if everything is ok now.

Thanks,
Shane

#2160591

I'm glad I didn't respond immediately as it was late and it appeared to be not working even after clearing the cache so I was a bit fed up 🙂

Happy to report that it looks good this morning. Thanks for all the effort in makng this work.

Is ther anything I need to know for future attempts?