Skip Navigation

[Résolu] How to find repeating field groups that were not assigned to their parent CPT

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: I would like to create a View of RFG that are not assigned to any parent post.

Solution: Use a View of RFG with no post relationship filter, and add a conditional like this:

[wpv-conditional if="( '[wpv-post-id item="@rfg-slug.parent"]' eq '' )"]  
RFG [wpv-post-title], ID: [wpv-post-id] is an orphan!<br />
You could add an edit post link here, if you'd like.
[/wpv-conditional]
This support ticket is created Il y a 4 années et 7 mois. 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.

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.

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)

Auteur
Publications
#1332751

I was working with Christian Cox on this ticket:

https://toolset.com/forums/topic/how-to-make-the-repeatable-fields-group-on-a-form-default-to-the-parent-cpt/
What is the link to your site?

I would like to ask if Christian could help with this part that we didn't get to when I resolved that ticket:

Excerpt from above ticket:
" I was able to add a room and NOT select the parent"job" the room was added (or so it appears?) but did not get added to the "job". So where is this room now and how to I get it assigned to the job? "

Can someone help me create a view maybe to be able to get all orphaned RFG's... this might be handy as the admin in case I need to help user's locate this information or find unassigned "rooms" once we go live?

Thank you!

#1332963

You can create a View of RFGs with no post relationship query filter, then add a conditional in the loop that tests the ID of the parent post. If it's empty, then the RFG is an orphan.

[wpv-conditional if="( '[wpv-post-id item="@rfg-slug.parent"]' eq '' )"]  
RFG [wpv-post-title], ID: [wpv-post-id] is an orphan!<br />
You could add an edit post link here, if you'd like.
[/wpv-conditional]

You would have to modify rfg-slug to match your RFG slug.

#1333519

My issue is resolved now. Thank you!
Thank YOU, again Christian Cox - Perfect!

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