Skip Navigation

[Resolved] Intermediate CPT contains relationship fields and fields in connected CPTs

This thread is resolved. Here is a description of the problem and solution.

Problem:
Custom field groups are displayed on all post edit screens and not just those where they are expected.

Solution:
When you create a Custom Field Group there is an option to specify which post types the field group should be assigned to, and which determines which post edit screens they appear on.

This support ticket is created 6 years, 1 month 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
- 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+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by laurieH 6 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#625522
Recipe table.jpg
New related ingredient.jpg

I am creating a support for recipes. The CPT Recipe has custom fields and is connected to the CPT Ingredients which also has a custom field. There is a many-to-many relationship between them that has custom fields.

I expected to see:
Recipe fields accessible in Recipes, Ingredient fields accessible in Ingredients, and the relationship fields available when connecting Ingredients to Recipes (Recipes Ingredients).

Instead, I got:
The table containing links between recipes and ingredients contains all custom fields. The form for adding new ingredients to a recipe also contains all fields. These areas should only contain the relationship fields.

#625548

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Screen Shot 2018-03-16 at 08.24.44.png

Hi Laurie

I couldn't initially reproduce this locally, but then I removed the post type assignment for my custom field groups and saw the issue.

Meaning, you should go to Toolset > Custom Fields and edit your custom field groups and set the post type to which they belong (see screenshot which shows when they are not set to a particular post type).

I think that will fix the issue, but if not let me know.

#625557

Problem solved!

Suggestion - All of the other systems that I have used that allow for the creation of relationships have set the default behavior to add fields only to the entity they were created in. It would be very rare for someone to want something to appear everywhere.

Thanks for the help!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.