I just created a Custom Post Type called Product using Toolset. I do have many products and I need to templates for them.
As suggested by WordPress I declared 1) a Template Name: Template Parent + Template Post Type: product for my parent product AND 2) a Template Name: Template Child + Template Post Type: product for my child product.I can now assign different templates to all my products.
I was hoping to build different custom fields for template Parent and template Child. However, when trying to select the template to assign to that specific Group of Fields, the templates O created for my CPT Product are not shown.
Is there a way I can achieve this?
Thanks in advance
Hi, it looks like you have created PHP templates for your custom post types in your theme. However, those are not the templates that will appear in the "Where to Use this Field Group" popup. In the popup you can choose from Toolset's Content Templates, and you can create these Content Templates by going to wp-admin > Toolset > Content Templates. The idea is that you don't need to create your own custom PHP templates, you use Toolset's Content Templates instead. You can assign each Content Template to an entire post type, or leave the template unassigned and assign a different template per post. Let me know if you have questions about that.
That’s right, we’re using PHP templates for this and the idea is to keep on using them.
I’m assunming there’s no way to include my PHP Custom Post Type templates in the “Where to Use this Field Group” popup, then?
Is there any workaround that you guys know of that I can use?
Thanks for the quick reply
No, you cannot include or register custom PHP templates in this popup. Alternatively you can assign the field group to a specific post type or types, use a custom field data-dependency, or use with specific taxonomy terms.