Skip Navigation

[Resolved] Count repeating field groups and display result in loop

This support ticket is created 5 years, 3 months ago. 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)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by marcialB 5 years, 3 months ago.

Assisted by: Minesh.

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

Languages: English (English )

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

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