Skip Navigation

[Resolved] Show Related CPT in Archives

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

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/Karachi (GMT+05:00)

Author
Posts
#2333863

Tell us what you are trying to do?
I want to show some fields from a Related CPT in an archives page.
Archives page: hidden link
This archives page contains 3 different CPTs: Dramas, Movies, and Specials
Each CPT may have a "Related CPT of Subtitle Project"

Example of a Drama CPT with a "Related Subtitle Project":
hidden link
Image: hidden link
You can see that there's a special callout box for "Available Subtitles"
I'm able to get the fields to show up from the "Related Subtitle Project" on the "Drama CPT"

Is there any documentation that you are following?
No.

Is there a similar example that we can see?
I'm trying to add the same fields from the "Related Subtitle Project" in the Archives.

I'm using the below code:
Subtitle Status: [types field='overall-status' item="@related-subtitle-project.child"][/types]
[wpv-conditional if="( '[types field='overall-status' output='raw' item="@related-subtitle-project.child"][/types]' eq 'ongoing' ) OR ( '[types field='overall-status' output='raw' item="@related-subtitle-project.child"][/types]' eq 'dropped' )"]
([types field='episode-status' item="@related-subtitle-project.child"][/types])
[/wpv-conditional] by [wpv-post-link item="@related-subtitle-project.child"]

I want it to display this:
Subtitle Status: Status of Subtitle Project by Subtitle Provider's name
Subtitle Status: Announced (linked to Subtitle Project) by amrayu (linked to Subtitle Provider page)

Parts of the site are blocked by Guests. If you need Admin access, please let me know.

What is the link to your site?
hidden link

#2334091

Hi,

Thank you for contacting us and I'd be happy to assist.

To suggest the best way to achieve this, I'll need to see how these archives and the single post pages are set up, in the admin area.

Can you please share temporary admin login details in reply to this message?

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

regards,
Waqar

#2335075

Thank you for sharing these details.

As "Subtitle Projects" post type has a many-to-many post relationship with the post types "Drama", "Movies" etc, you'll need a post view to show the information from the related subtitle post.

On the single drama post page, the website is using a view "Subtitle Projects for Dramas Movies Specials" to show the related subtitles information. You can use the same view in the loop of the archive "Drama Archive" and it will display the related subtitle post information.

If you need to show subtitle information in a different format or with different/selective fields in the archive, you can create a duplicate of the view "Subtitle Projects for Dramas Movies Specials" and use that instead.

#2335707

My issue is resolved now. Thank you!