Skip Navigation

[Resolved] can't get view widget to work

This support ticket is created 6 years, 3 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
- 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)

This topic contains 3 replies, has 2 voices.

Last updated by WillL606 6 years, 3 months ago.

Assisted by: Waqar.

Author
Posts
#1121037

I am trying to:
I have several sidebar widgets that display related essays to the main displayed essay. All of these are slightly different, but I can't seem to create a new one. I have custom post types: Essays and Gatherings. Gatherings are a curated group of essays. In the main Essay posts I would like a sidebar widget that appears if the displayed essay appears in a gathering. So a heading that reads "other essays in [name of Gathering with link to Gathering page]" followed by a list of 3-5 essays in that Gathering.
I am doing something similar with Authors and Threads (like categories).

Link to a page where the issue can be seen:
essays: hidden link
gatherings: hidden link

I expected to see:
something like "other essays by author" and "other essays in thread"

Instead, I got:
empty widget

#1121593

Hi Will,

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

To troubleshoot why the assigned views are not showing any content in the widgets, we’ll need to perform few tests by making changes to the existing views and widgets.

Since your website is live, we'll recommend sharing access (WP-Admin and FTP) to your test/development site, where the problem has been replicated.

This access will allow us to offer better help and check if some configurations might need to be changed.

Your next answer will be private which means only you and our support team will have access to it.

If you’d like us to continue our troubleshooting on this live/production website, it is very important that a complete backup of your database and website has already been made.

We would additionally need your permission to deactivate and reactivate Plugins and the Theme and to add/remove widgets on the site. This is also a reason the backup is really important.

Please let us know if you have any further information or questions.

Regards,
Waqar

#1121685
#1123413

Hi Will,

Thank you for your permission and for waiting with us.

During troubleshooting, I noticed a few items that needed to be adjusted, in order to show the list of essays belonging to the same gathering.

1. In your view "get-related-gathering-essay-widget", "shortname" field was called in the loop item template. As this field is connected to essays and not gatherings, it won't return any value and I've commented it out.

Since here the loop is returning the gathering item(s), I've placed the heading in this loop item template, which works:


<h6 class="related-essays">other essays in [wpv-post-link]</h6>

Note: this heading was placed in the child view "display-gathering-related-essay-widget", where the loop contained information about essays and not gatherings, which is why no data was being returned. This way, you also don't need to call in a third view "Gathering Title", just for this title.

2. In your other view "display-gathering-related-essay-widget", the query filter was set to "thread_essay " relationship and not "essay_gathering" relationship.

I've updated that and the whole widget now works as expected on the single essay pages.
( e.g. hidden link )

I hope these findings will help! Please let us know if you need any further assistance.

regards,
Waqar

#1123418

Thanks for your help. It is exactly what I wanted.