Skip Navigation

[Résolu] Post relationship panel is showing the wrong select menu for one of the parents

This support ticket is created Il y a 6 années et 9 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

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

Last updated by Shane Il y a 6 années et 9 mois.

Assisted by: Shane.

Auteur
Publications
#546955
settings.jpg
project-related-projects.jpg
landing-related-projects.jpg

I've set up a many-to-many post relationship.

I have two parent post types: Projects and Landing-Pages

I have set up a post-type call Related projects and I have set both Project and Landing Page as the parent post types. I'm pretty sure I've got the parent-child setting correct (see settings.jpg)

When I go to the edit page for a landing page post type it all looks good (see landing-related-projects.jpg) with a dropdown to select a project appearing next to each row.

However, on the edit projects page the select menu for "landing page" is appearing instead of a select listing all the projects. (project-related-projects.jpg).

Any help appreciated.

Dan

#546998

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for contacting our support forum.

So pretty much the issue here is that the Related projects CPT is not behaving like a child CPT?

Would you mind providing me with admin access to the website so that I can have a look to see what is happening here.

The private fields have been enabled for your next response.

Thanks,
Shane

#547420

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for the credentials, I tried logging in but no luck.

Could you check on them and let me know.

Thanks,
Shane

#547440

Shane, I updated the password in the private message - please try again

#547486

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for updating the credentials.

Actually it is correct. Parent CPT will allow you to create a Child Post from their Edit screen and given that Both Projects and Landing Pages are parent CPT for Related Project then this is how they will display.

If you check Related Projects you notice that it displays differently sso everything is actually correctly displayed.

Thanks,
Shane

#547514
project-related-projects.jpg

OK but why are the post relationship options different for both the parent CPTs - see images I attached.

The in the post relationship panel on the edit screen for Landing Pages you'll see a dropdown with a list of projects - which is correct.

The in the post relationship panel on the edit screen for Project you'll see a dropdown with a list of Landing pages - this isn't what I want. I need to be able to choose a project NOT a landing page - why is it showing a select menu with the other parent CPT?

If you click to edit the related project you are presented with the correct projects dropdown on the edit screen for related projects - so why isn't this dropdown shown on the post relationship panel on the edit screen for Project ?

I've attached the screenshot of the problem panel again.

Many thanks

Dan

#547541

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Let me see if I can explain this better for you.

So in your screenshot it is from the Projects CPT on the Related Projects CPT. You are seeing the landing page select dropdown because this is the Parent select dropdown for the Landing pages that are created from the Project.

If you create a Related Project from a Parent Project post that related project will automatically have that project as a parent but since it is a 2 way parent then the Parent selection for Landing pages will show up as well.

Please let me know if this clears things up for you.
Thanks,
Shane

#547727

Hi Shane,

Yes, I understand that. But why do different options for the related project CPT in the list view (at the bottom of the edit project page) and the edit related project view?

The former shows a "landing pages" select box (which isn't what I want), and the latter provides a select menu for projects (which is all I want).

If I've set this up incorrectly how do I achieve the above?

Many thanks

Dan

#547950

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Screen Shot 2017-07-12 at 9.32.30 AM.png
Screen Shot 2017-07-12 at 9.32.05 AM.png

Hi Dan,

I don't believe i'm understanding you clearly so this is what I think you're asking.

You're asking why is the Related project CPT displaying like this versus why is the Project CPT displaying like this. See Screenshots

Please let me know if this is what you are referring to.

Thanks,
Shane

#548832
project-related-projects2.jpg

Hi SHane,

It may be that I've just not understood how to set all this up.

But what I was hoping to achieve was to have a "related" projects panel at the bottom of both the edit projects page and the edit landing page screen where I can create a related project by choosing from a dropdown that contains all the related projects.

On the landing page edit screen this works fine - however on the edit project screen the panel for related projects is only showing me a dropdown for "landing pages" and I need to see a dropdown containing all the "projects" - it's related projects I need to set. (see project-related-projects2.jpg).

If I click to edit of the related projects I can see both a dropdown for landing pages AND projects.

Dan

#548838

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

That is because if you create a Related project From a project you won't get the dropdowns to select a project. That is because that project will automatically become the parent, now you are presented with the option to select the landing page because this is not automatically assigned.

If you were to create a related project from a landing page then you will get the project parent dropdowns to select a project.

Please let me know if this clears things up for you. In no scenario will you get Both Landing page and Project unless you create a related project from the related project tab.

Thanks,
Shane

#549345

Hi Shane,

Thanks for all your patient explanations.

OK, so how do I achieve what I want?

At the bottom of BOTH the edit screens for landing page CPT and the Projects CPT there should be the ability to select multiple projects by using a dropdown menu to select each.

I know how to achieve this for a single Types custom field by using a select menu then adding a custom function to populate that menu with a list of the custom post types - but I can't make this method into a repeatable block - which is what I need.

I'm aware there's other ways I could achieve this - e.g asking the wordpress admin user to manually type in either the Titles, slugs or IDs of the related posts but that's just not very user friendly, and would involve them going off and finding the the ID of the posts they want.

To be honest this is a shortcoming I've often found when using the Types plugin which in all other respects I've found to be a very powerful and efficient tool.

Thanks

#549484

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

From what you are saying I gather that you want to setup a many to many relationships where you can assign multiple Projects and Multiple Landing Pages. In this case I would recommend that you take a look at the link below.

https://toolset.com/documentation/user-guides/many-to-many-post-relationship/

Please let me know if this helps.

Thanks,
Shane

#549501

Hi Shane,

Yes I've read that page, and that helped me set up the system that I currently have in place - but it isn't what I want to achieve. Please can you look at my previous post to see what it is I'm trying to do and explain how/if that is possible.

Thanks

Dan

#549544

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

I took another look at your previous post and what you are asking is actually not possible 🙁 the only way to do the many to many relationships is through the method that you currently have . You are a not able to do in the way you define it in the previous post.

Thanks,
Shane

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