Skip Navigation

[Resolved] Nested repeatable field groups in a View (that uses info from a parent post)

This thread is resolved. Here is a description of the problem and solution.

Problem: I have a nested repeatable field group (RFG) structure inside a custom post type. I also have another child post type of that main custom post type. On the child post template, I would like to display information from the RFGs. I can display information from the main RFG, but not the nested RFGs.

Solution: Check to be sure the correct RFG type is selected in the View's Content Selection panel.

This support ticket is created 3 years, 10 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 5 replies, has 2 voices.

Last updated by Christian Cox 3 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#1978585

I'm trying to get a nested repeating field group to appear within another RFG.

I have a CPT called Developments. This has a RGF called Models. And within Models is another RGF called Floor Plans.

(One complication:

The View to show Models is actually on a child post type of Developments (Dev Extras) and so I've had to create a parent view for the Models view, which allows for this.

Settings:
1. Parent view set to "related to the Post where this View is shown".
2. Child view set to "Model group that are a related to the current post in the loop"

)

As you can see on this page, I can get the Models to show no problem using parent and child views (Models and Floor Plans section).

hidden link

However, the Floor Plans aren't showing up.

I thought that by putting the view shortcode for Floor Plans into the view for Models, this would work:

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
Stuff goes here...
[wpv-view name="floor-plans"]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

It's accessing the correct View, but shows the message" No floor plans yet".

I'm assuming it's an issue with the filter settings.

What's the proper way to get this to work?

#1978639

Hi, I would expect this setup to work if the View of Floor Plans has a post relationship filter set to parent is the current post in the loop (i.e. the parent is "Model", and is the current post in the loop). Can you show me the configurations for the Floor Plan View's post relationship filter?

#1978649
Screen Shot 2021-03-08 at 1.36.21 PM.png

For sure. Here's a screenshot for this View's settings.

#1978671

The filter looks okay, but I noticed in the content selection area you have both Floor Plan and Floor Plans. Is it possible you have the wrong item selected in Content Selection? It's a bit confusing to have two items like this with similar names.

#1978705

That's the issue. I had forgotten there were two different repeatable field groups for adding floor plans in different ways. Had selected the wrong one. Easy solution; should have seen that from the start.

Thanks!

#1978719

Great, glad it was an easy fix.