Sauter la navigation

[Résolu] Create content template for specific pages

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

Problem:

We have about 20 pages that all share the same layout, just slightly different content, this we can create custom fields however how do target specific pages for a 'page' temple?

Solution:

The simplest way is:

Find and edit those specific pages, in section "content template" choose the specific content template manually

Relevant Documentation:

This support ticket is created Il y a 4 années. 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

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

Dernière mise à jour par Pete Il y a 4 années.

Assisté par: Luo Yang.

Auteur
Publications
#2045583

Hi there,

Can I create a content template for specific pages? We've done this for custom post types however these have specific taxonomies and categories so we can target those.

We have about 20 pages that all share the same layout, just slightly different content, this we can create custom fields however how do target specific pages for a 'page' temple?

Many thanks.

#2045701
ct-section.JPG

Hello,

The simplest way is:
Find and edit those specific pages, in section "content template" choose the specific content template manually, see my screenshot ct-section.JPG

If you want to use custom codes to specific page content template, please check filter hook "wpv_filter_force_template":
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_force_templateFilters the ID of the Content Template that is going to be applied to a post.
See the example codes of above document

#2045721

My issue is resolved now. Thank you!