Passer la navigation

[Résolu] Loop videos in a gallery post

This support ticket is created Il y a 1 year, 5 months. 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.

Ce sujet contient 0 reply, a 1 voix.

Dernière mise à jour par mauroM-3 Il y a 1 year, 4 months.

Assisté par: Christopher Amirian.

Auteur
Publications
#2787324

I created a custom post type (gallery) containing a repeated video field and a repeated gallery field.
How can I loop in videos selecting only videos that are part of the repeated video field for the current post?
At this very moment the video selected is out of a different post...

lien caché

#2787531

Minesh
Supporter

Les langues: Anglais (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please send me admin access details and let me check what's going wrong with your setup.

I would like to know have you created the content template or view to display the repeating viedeo field? what is the video field name?

*** 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.

#2787603

Minesh
Supporter

Les langues: Anglais (English )

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

To your content template I've added the "Fields and Text" block and added the following shortcode to display the repeating video:
=> lien caché

<div class="myvideo">[types field='video' separator='</div><hr /><div>'][/types]</div>

You do not reqire view to display here as we are on single gallery post.

#2787669

OK. What if it was a relationship with another cpt?

#2787836

Minesh
Supporter

Les langues: Anglais (English )

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

For that you will require a view to use view and filter the view results with post-relationship filter.

#2788875

OK.
Your approach doesn't work in a event template that relates 1-to-1 to a gallery.
Same snippet. Empty result.
Look here:
lien caché
The template is the "event" one. Can you have a look at this?

#2789162

Any update on this?

#2789392

Christopher Amirian
Supporter

Les langues: Anglais (English )

Hi,

This is Christopher answering as Minesh is on vacation.

Just FYI, the reply time will be longer due to holiday season.

I tried to check the website but for some reason the login information that you shared is deleted.

I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

Also please give me the details on the 1:1 relationship as I am not sure it is happening between which CPTs and what you want to achieve exactly.

Thanks.

#2789810

OK!
It was my blame.... I wasn't referring correctly the child post.
This is the correct snippet:
<div>[types field='video' separator='</div><hr><div>' item='@evento-galleria.child'][/types]</div>