Skip Navigation

[Assigned] Loop videos in a gallery post

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)

This topic contains 0 replies, has 1 voice.

Last updated by mauroM-3 2 days, 20 hours ago.

Assisted by: Minesh.

Author
Posts
#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...

hidden link

#2787531

Minesh
Supporter

Languages: English (English )

Timezone: 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

Languages: English (English )

Timezone: 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:
=> hidden link

<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

Languages: English (English )

Timezone: 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:
hidden link
The template is the "event" one. Can you have a look at this?

#2789162

Any update on this?