Skip Navigation

[Resolved] How do I get relationship posts that we store as table in custom post type

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

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 35 replies, has 2 voices.

Last updated by Nigel 4 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#1528271
issue.png

Hi
I have migrated data from dupal to wordpress and it created one custom post type called Issue.
Now I want to fetch related data of issue. please check snapshot of that.
I want to fetch all articles and its data like volume and year. Please help me I was trying to open ticket from 15 days and form was not working for me. Please please please ASAP.

#1528533

Can you please reply ASAP I need this to be done today please try to understand, Its already late for me or you can give phone number or email directly.

#1528619

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

You have some custom post types, and these post types are connected using Toolset post relationships, yes?

And you want to display data from related posts?

For example you might have "Albums" and "Songs" post types connected in a many-to-many relationship. (Albums contain more than one song; the same song can appear on different albums.)

When displaying an Album post, you want to list the connected Songs (i.e. the songs that appear on that album), for example.

To do that you would add a View to the template used to display album posts.

The View would query Song posts, and it would include a post relationship Query Filter that specified the songs should be related to the current album post. The output of the View includes fields from the song posts such as the post title.

Details of how to display related posts are documented here: https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/

If there is something specific you need help with then please let me know, with as many details as possible.

#1528689
volume-article.png
issue-custom-pos.png

Yes I still need assistance please.
I installed tool-set views now because it was not there before.
Please check issue-custom-pos screenshot.
1) In this snapshot you can see, toolset created issue custom post type. Okay
Now check second snapshot that is edit issue type: volume-article.png
Did you see Volume Article table?
I want to get volume of that issue time.
You can check my back end. Here is the access details:

Awaiting to hear you Please reply me ASAP.

#1528709

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I removed your site credentials, this is a public forum, please only share them when we set up a private reply.

I logged in to your site.

I see that you have a one-to-many relationship between Volumes and Issues.

So one parent Volume can be connected to many child Issues.

I want to get volume of that issue time.

I'm not exactly sure what you mean.

You are displaying a Volume post and you want to show the connected Issues?

Or you are displaying an Issue and you want to show which is the parent Volume?

Or something else?

#1528793

I am displaying issues and want to display volume/year under that post.
That you can see in my snapshot.

#1528795

Like see : hidden link

#1528799

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, so while showing a child post you want to display the title of the parent post.

That is described in the document I shared with you earlier: https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-one-related-item-parent

From your screenshot it looks like you are outputting a list of Issues with a View. In the output section of the View where you want the Volume title to appear use the Fields and Views button to insert the Post Title, and in the resulting dialog use the Post selection tab to choose the option "A post related to the current post, set by a Types relationship" and select the Volume << Issue relationship.

The post title which is then output will not be for the current Issue returned by the View and will instead be from the parent Volume.

The principle is the same if you use Blocks instead of Views to generate the list of Issue posts, where you would use a Single Field block and specify the source for the field accordingly.

#1528875

I still did not get. Can you create view for me named anything so that I can save time.

#1528879

One more thing I did not use view in snapshot that I send you its my custom code.

#1528913

Can you please assist me ?

#1529013

Nigel Can you please help me on your first priority.

#1529037

Nigel Can you please answer me, I am waiting you please answer atleast.

#1529109

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Sorry, my shift ended over 2.5 hours ago, I'll be able to help you again in the morning.

I can't make your website for you, I can only explain how the plugins work.

If you follow the steps I described above, or those in the linked documentation, and you have got stuck somewhere, let me know what you did, how far you got, and where you got stuck, and then when I return I'll be able direct you what to do next.

#1529123

I already created view and its not showing data, Please assign this job to someone else who is working currently.