Skip Navigation

[Resolved] Post type relationships

This support ticket is created 4 years 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.

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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 7 replies, has 3 voices.

Last updated by Luo Yang 4 years ago.

Assisted by: Luo Yang.

Author
Posts
#1570667
Screenshot_20.png

Hey, guys, I have a problem concerning post types. I am using Toolset, ACF Pro and Oxygen. I have two post types: Inspirations and Influencers. Inspirations are basically styles for interior design like Mid-century, Vintage etc. Influencers are... well, influencers. I have created a many to many relationship with toolset but not really using it yet for anything. So, looking at the screenshot, starting from the left I have a page for inspirations (this is easy). then I have a page with the exact same design, but this one is not inspiration but INFLUENCERS that have opinions/images about the INSPIRTION(in this case the inspiration is Scandi). What I am trying to figure out is how to: when you click on an inspiration in the Inspirations archive, instead of leading to the inspiration page, to lead to the page where all the influencers and their image for that inspiration is shown.

Should I make another archive and somehow populate it with dynamic data from each influencer? If so, how? Because I can't pull in all the influencers in an archive based and then only grab the ACF field from each influencer that corresponds to the selected inspiration dynamically

I tried to make this question as non-convoluted as possible, but to be honest I find this idea stupid, especially for a WP site, so I can't really even get into the idea enough to explain it super well.

#1570763

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As I understand, when you click on the single item of post type inspiration, when you click it, you want to display the related posts of post type Influencers that belongs to that single inspiration rather displaying the singe post of inspiration. am I right? If yes;

You can display the related posts using the view and you need to create another page for that and when user click on that single item you should link to that page that contains the view that displays the related posts. Please check the following doc:
=> https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-information-from-intermediary-post-types

Please let me know if you need further help with this. For that, you need to share access details and problem URL where you are displaying the inspiration post list.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) 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.

#1571877

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

thank you for sharing access details.

Can you please share the problem URL and one test case example showing what information you want to display with what page?

I have set the next reply to private which means only you and I have access to it.

#1571967

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you for sharing access details.

I review the following Scandi post that belongs to post type "inspiration-type".
- hidden link

I see that the above post is related to only "Anna Jones" - is this correct? Why I'm asking because in your previous reply you shared that: ("Scandi is related to Anna Jones, Jenny Twaddle, Sasquatch McKenney") .

So, basically, when you click on "Scandi " on the following link: hidden link
- You want a page that displays the related post "Anna Jones" and what exactly the other information you want to display?

#1572067
Screenshot_21.png

It only shows Anna Jones because I only created one example of an influencer. So in this case, when you click on Scandi here: hidden link what should happen is the page I've been talking about, which I don't know how to create, which would show all influencers that have a relationship to Scandi and they would show as image (specific from influencer about scandi) and name of influencer. Please see attachment. The designs in the attachments are, from left side, as follows: 1) Inspiration archive, 2) The page I have an issue with / influencers in relationship to selected inspiration, 3) Inspiration details page (need to link to dynamically) and 4) Influencer details page (need to link to dynamically)

#1572267

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

First of all - I see you are using oxygen builder with your site and oxygen builder has limited integration with Toolset.
=> hidden link
=> https://toolset.com/documentation/user-guides/using-toolset-with-oxygen-page-builder/create-templates-for-custom-post-types-with-oxygen-and-toolset/

So, for now, I've deactivated oxygen plugins on your install.

To demonstrate you the way, I've installed the Toolest Views plugin on your site and Created the following post type archive:
admin => hidden link
frontend (post type archive) => hidden link

I've created the following page, so when you click on the any of the listed item with the above archive page it will redirect you to thee following page:
backend: => hidden link
frontend => hidden link

To the above "related-influencer-page" I've added the following view that is used to find and display the related influencer posts.
=> hidden link

So, for example, if you click on 'Scandi' on the following link:
=> hidden link

It will display the related influencer post(s) on "related-influencer-page":
=> hidden link

You can format the Loop Editor section of both post type archive and for the view that displays the related influencer posts.
=> hidden link
=> hidden link

You can add as many fields as you want to your Loop Editor section and format it.

More info;
=> https://toolset.com/documentation/user-guides/views/digging-into-view-outputs/

#1574517

Hi, Minesh.
For now I don't see a solution, unfortunately.
First, because we need Oxygen, this is not an option to change it this far into the project.
Second, because the only functionality I see is displaying a list of related influencers. This is good, but not enough. I would also need this influencer page to display a piece of content from the related influencer which is dynamic, based on what inspiration was selected. See, we will need for each related influencer to display an image as well, but only an image that also has a connection to the inspiration or at least is a custom field on the post type called something like "[inspiration_name] image"

I am considering, at this point, to not use toolset, I think. But not sure yet

#1575321

Hello,

Minesh is on vacation, I will take care of this thread.

I have done below modifications in your website:
1) Edit the Oxygen template "inspiration-single", add a shortcode cell just after post content, with Views shortcode:
[wpv-view name="display-related-influencer"]
https://toolset.com/documentation/user-guides/views/views-shortcodes/#vf-154377

2) Test it in front-end:
hidden link

I can see it works fine.

You can customize the post view "display-related-influencer" here:
hidden link

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