Skip Navigation

[Résolu] Post Field Groups targeted to specific pages instead of all pages

This support ticket is created Il y a 7 années et 5 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Europe/Madrid (GMT+02:00)

This topic contains 2 réponses, has 2 voix.

Last updated by webD-3 Il y a 7 années et 5 mois.

Assisted by: Juan.

Auteur
Publications
#456233

I am trying to: Make the backend more straightforward for my clients

Instead, I got: all Post Field Groups appearing on all Pages instead of just the Post Field Groups that apply to a specific page

I see that my question/request has been asked previously, multiple times in the past few years, so I simply wish to place my vote/recommendation that this be added into a future version of Types.

I have a Post Field Group for custom fields for the site homepage. These fields are only needed on the homepage, but the Group appears in the backend on all Pages. Likewise, I have another Post Field Group for a specific set of pages that all utilize the same Layout, but the Group appears in the backend of all Pages, not just the pages where the fields actually are included.

Might it be possible for the display of Post Field Groups to be conditional based upon the Page/template/Layout, or alternately provide a UI in which an Admin can manually turn off or hide Post Field Groups on a page-by-page basis?

#457208

Juan
Supporter

Timezone: Europe/Madrid (GMT+02:00)

Hi there

Thanks for the feedback.

Yes, this has been requested a number of times, but still the solution is not that strighforward.

As a general background, custom fields are metadata that belong to a type of content. That is why a fields group os show on all the posts that belong to a given post type. If you assign a fields group to pages, it should contain all data that belong to pages as a post type.

In other words, having fields for just one page seems like wrong, in the sense that fields should represent additional data that you need to add generially, and for editing data for a singe page you can easily dd it into the post contet instead. Maybe less comfortable, but doable.

But then, you mntion field groups for post gropus, and that changes everything. It does make sense to have a fields group but only for some posts. In your case, those posts all use the same layout, and as they have that in common, it feels right to have dedicated fields for them.

We already have a request on improving the fields grops conditionals. Right now, you can conditionally show or hide them based on taxonomy, Content Template assigned, or with some custom conditionals based mainly on custom field values - we might want to extend it based on layout usage, and I am adding a note for this. On the meantime, you might want to explore alternatives for conditional display based on a custom, private taxonomy.

Unfortunately, there is no native way of showing or hiding a fields grup on specific posts of a post type. You can use the Screen Options on the top right corner of the post edit page, but that gets applied to all the posts of that type, not just the current one. I do think that the best option here would be to expand the conditions that you can use.

Hope it helps.

Regards.

#457754

Juan,

Thank you for the reply. I realize some of the complications, but was just wishing to express support of this idea. As a developer it's not that big of a deal, but for my clients I'd like to only display the fields that are actually in use for the page in question.

I always try to work within the parameters of plugins where possible, which is why adding conditionals for layout and/or page ID would be helpful. But for now, I have arrived at a solution to hide the unnecessary field groups via CSS.

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