Sauter la navigation

[Résolu] Use custom field (repeatable group) outside post

This support ticket is created Il y a 5 mois et 2 semaines. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Ce sujet contient 0 réponses, a 1 voix.

Dernière mise à jour par Minesh Il y a 5 mois et 2 semaines.

Assisté par: Minesh.

Auteur
Publications
#2783633

I have a post type called "ships". The post author can also publish stories about their journeys, which is a custom field (repeatable group). Those stories are published in the single ship template.

But now, the clients would like to publish the latests five stories (from all users) on a seperate page. Is that possible?

#2783676

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Sorry but I still do not understand the data structure you have.

You have post type "ships" and you have repeatable field group assigned to this post type?

Can you please share bit more details about the data structure you have and what exactly you want to display on what post/page?

Maybe you can send me admin access details with all above information.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2783681

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Can you please check now: lien caché

I've added the view's shortcode to above page:
=> lien caché

[wpv-view name="display-rfg-top5-posts"]

I've created the following view and set this view to query your desired Repeating field group and also set the limit to display 5 posts order by post date DESC:
- lien caché

You can adjust the view's loop output as per your requirement to display any additional custom fields or anything else.

Can you please confirm it works as expected.

#2784126

Thanks, this seems to do what I need. But why did you make it in the legacy view? Can't this be done with the block editor?

#2784260

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

With block editor, you can create block view with repeating field group on single post content template, that is why I used the legacy view. You can build the loop output using the block view.