Skip Navigation

[Resolved] Setting up repeating groups of fields, and assigning that group to page template

This support ticket is created 7 years, 3 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 7 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#559419

Hi,
Im trying to setup repeating groups of fields and only have that repeating group show up for specific page template(s). But currently, that does not work. The repeating group will show up on every single page, regardless of template i choose.

I can create the repeating group just fine, and it works. I just need to restrict that repeating group to one page template, for example: home.php only.

Can this be done?

#559592

Hi, Types is designed so that you don't need to make modifications like this in PHP files, and there's no way in Types to say "only show this when a specific PHP template file is being used."

Instead, the Types way is to set up conditional HTML display within a Content Template, View, or Visual Editor cell. We have a document that describes conditionals here:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

Your conditional logic can test something like the current post slug, or the value of a custom field applied to each post, or any other logic you choose based on data accessible to Views. Please let me know if you have any additional questions about that.