Skip Navigation

[Gelöst] Count repeating field groups and display result in loop

This support ticket is created vor 5 Jahren, 11 Monaten. 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)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von marcialB vor 5 Jahren, 11 Monaten.

Assistiert von: Minesh.

Author
Artikel
#1179092

Hi there

This is a follow-up to this thread: https://toolset.com/forums/topic/count-entries-in-repeatable-group/

I would like to display the number of rooms (repeating field group) a location has in the search results. I managed to display the number on the post itself.
However, that code

[show_rfg_count post-id="wpv-post-id" type="*****"]

is obviously not working anymore as the current post ID is the ID of my search page.

Is there a way to replace

post-id="wpv-post-id"

with something, that takes the ID of the current post in the loop?

Thanks a lot.

Best,
Marcial

#1179118

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - what if you try to add [wpv-post-id].

For example - pelase check that we used _ (underscore) with argument:

post_id="[wpv-post-id]"
[show_rfg_count post_id="[wpv-post-id]" type="*****"]

Please make chages accordingly to the code as well. If you do not know how to do it, please share problem URL and access details.

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