[Resolved] How create a view that shows items with certain content in Repeatable Field Grp?
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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I got stuck with building the views for a website of a distributed event at hidden link
We have users who can create Locations (custom post types) and sign up to participate in a certain edition of our event, e.g. for 2024.
For this "ECD Participation" I have created a repeatable field group in Location post type, that includes the respective year as well as other fields related to the event at the location in that particular year.
Now I want to create a view (list and map) that shows all Locations that have an "ECD Participation" entry with the year ("ecd edition") 2024. But somehow it seems I don't manage to get this as a filter? How do I do this?
(btw I am more familiar with the legacy Views rather than with the block editor mode)
Here is the example from last year, the first edition: hidden link where the participation information was defined as fields directly in the Location post type, which was easy to filter but is of course not the right solution on the long run…
Hello. Thank you for contacting the Toolset support.
If you only want to attach the year as "ECD Participation" why you are using repeating field group? In that case what if you try to use taxonomy and setup term as 2024 - does that makes sence?
I am sorry that it seems you misinterpreted my screenshot crop. As I wrote in my text, "I have created a repeatable field group in Location post type, that includes the respective year *as well as other fields related to the event at the location in that particular year.* " hence there is much more information included in this group, that is only applicable to the respective year.
Do you want frontend custom search filter to filter the repeating field group items or you want to filter just based on current year and compare the value of current year 2024 against the field "ecd edition"?
If you can share problem URL and tell me what fields you want to display on what page/post and share admin access details once I will review your setup I will be able to guide you in the right direction.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) 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.
To filter the view with the field belong to repeating field group.
As you can see with your view - I've added the following filter to Query Filter section:
- hidden link
Select items with field:
Coworking Day Edition is a number equal to VIEW_PARAM(year)
And this is how I've added the map marker so that it should display the parent location "Geoaddress" field inside the view loop:
With the page where you added the view - I've added the "Fields and Text" block and added the view as given under where we can pass the year as view's shortcode attribute with the desired value, in this case its 2024 :
- hidden link
Thank you, yes the map is displaying the participating locations in 2024 now.
I have added some parameters to the map and pin and now try to adopt the content template for the popup content. I have created a copy of the "map-pin" content template as "map-pin-24" hidden link where I now need to adopt the parameter references (from "this location" to "the location parent to this ecd-participation" etc.). How is this reference inserted for conditionals, e.g. [wpv-conditional if="( $(wpcf-tagline) ne '' )"] if it referes to the tagline of the item="@ecd-participation.parent"? The visual shortcode dialogue lets me only add "of the current post" not refer to the owning/parent location…
Same question for the [wpv-view name="ecd-events-at-location-pin"] which is a view of the owning/parent Location, not of the "ECD participation"?
As per our support policy - We entertain only one question per ticket. This will help other users searching o the forum as well as help us to write correct problem resolution summery.
May I kindly ask you to open a new ticket with every new question you may have with all required details and kindly mark resolve this ticket as original question reported with this ticket is already addressed.