[Resolved] Related Posts not appearing in Elementor CPT template

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 4 replies, has 2 voices.

Last updated by Luo Yang 1 month, 2 weeks ago.

Assigned support staff: Luo Yang.

Author
Posts
#1631363

Tell us what you are trying to do?
I have 2 CPTs - Case Studies, and Services. They are related many to many (Case Study Services relationship). I have built an elementor page template for Case Studies and at the bottom I hope to pull through the related services as links (to the service in question).
I understand that you can't pull through related fields as dynamic fields in Elementor so I have created a View to bring though the related post data, and I've added the View to the Elementor template. The View is set to display Services data and there is a query filter on the Case Studies Services relationship
Sadly - the related Services are not coming through.

Is there any documentation that you are following?

https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items
https://toolset.com/forums/topic/related-posts-data-with-elementor/

Is there a similar example that we can see?
Not that I can think of, but the Farmers Markets and Vendors example is a good one.

What is the link to your site?
Here is a link to a Case Study that should have services listed:
hidden link

#1631483

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hello,

I assume you are going to display related "Services" posts in a single "Case Studies" post.

The screenshot you provided above, the settings are correct:
https://toolset.com/wp-content/uploads/2020/05/1631363-related_posts_issue_1.jpg

And I have checked the problem URL:
hidden link
I assume we are talking about section under text "SERVICES", I have checked it in HTML source codes, there isn't Toolset Views HTML codes at all.
Did you put the Views shortcode there? for example:
[wpv-view name="my view name"]

More help:
https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-view

#1631659

Thanks Luo. Yes you are correct in all of this above.
Displaying related Services in a Case Study post.
Yes - in the section under SERVICES I've tried adding the Toolset Views Widget in Elementor, then selected the correct View and also adding the Views shortcode:

[wpv-view name="services-for-case-studies"]

Nothing appears in either case. I've tried just adding some copy to the View (above the

I think that is the issue - the shortcode / widget isn't working. If it was and the query was incorrect, it would display the "not found" message it.

Huh - I just deleted the View (which was correct) and added it again and it now works - frustrating!

#1631677

My issue is resolved now. Thank you!

#1631679

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

It should be a compatibility or cache problem, I suggest you try this:
deactivate all other plugins, and switch to wordpress default theme 2020, and test again