Skip Navigation

[Résolu] Show intermediary posts in menu after hiding them initially

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

Problem: I would like to be able to reveal intermediary post types in the main wp-admin menu, and allow them to be queried in Views. The intermediary post types are currently hidden, because I set them up as hidden when I created the Relationship.

Solution: Edit the intermediary post type and mark the post type status "Published" to expose it to wp-admin and Views queries. Change the post type status back to "Draft" to hide the post type again.

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.

This topic contains 2 réponses, has 2 voix.

Last updated by Stephen Vaughan Il y a 3 années et 3 mois.

Assigned support staff: Christian Cox.

Auteur
Publications
#912497

Something that I am trying to get my head around, though I am sure there is a good explanation, is the fact you can only get the intermediary post types to appear in the menu and other places (selectable in views) when you set up the relationship. There are a number of instances where this could be problematic.

Firstly you need to be 100% sure of the functionality you are targeting in terms of perhaps having to edit fields in the intermediary type in the future. So for example the client enters data incorrectly on creation of a song in album scenario, they enter the wrong track and because the type isn't accessible there is no way now to go in and edit it. The only workaround is to delete the instance and recreate the song on album with correct track number.

If you have an extensive catalogue already entered (many many songs on many many albums) and a new field is required in the intermediary post, yes you can add the field but how to you go back and get access to it per song/track post.

Even if you started well with the intermediary post type visible in the menu, if you go to view the records you get a list of Tracks: Song ID - Album ID. Not very informative. So even if you want to correct the data in a specific track number field it wouldn't be easy to correct. It would be nice to see the relationship explicitly displayed as Track: Song name - Album name.

Perhaps I am overlooking some things?

#912618

Hi, you can edit the Intermediary Post Type and set it as "Published" in the Post Type Editor screen. This will reveal the post type in the wp-admin menu, and will allow you to query it in Views and so forth. Please check this out and let me know if it's not sufficient for what you want to accomplish, and we can take a closer look.

#912629

Ok, great. All starting to add up as useable now.

Thanks again. I am sure I will have more questions. I see an options check box under Repeatable fields groups in views....? I will keep reading the documentation.

Cheers.