Skip Navigation

[Resolved] View data not showing up

This thread is resolved. Here is a description of the problem and solution.

Problem: I have a View that is ordered by a custom field. No results are displayed.

Solution: Make sure the field has content in any post you want to show in the results. Make sure the appropriate field is selected in the filter, because sometimes fields have the same or similar names.

This support ticket is created 4 years, 11 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 7 replies, has 2 voices.

Last updated by prasadS 4 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#1236600

I am trying to: Display a view inside a layout. I have a custom post type named 'Hotels' and a custom post type named 'Reviews. They have a one-to-many relationship. Each hotel can have multiple reviews. But the reviews are not showing up.

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

I expected to see: List of reviews.

Instead, I got: No reviews.

#1236677

Hi, can you take screenshots of the View in wp-admin so I can see how your Query Filter is configured?

#1236843
Screenshot 2019-04-29 at 1.48.59 PM.png

Attached is the screenshot showing the query filter.

#1237051

I can see your Ordering settings are based on a custom field Review Date. Since you are sorting based on that custom field, if the Reviews do not have a set Review Date, then they will not appear in the search results. It's a quirk in the way WordPress queries work. If you change the ordering to Post Date instead, do the Reviews appear?

#1237528

I changed the sorting from 'Review Date' to 'Post Date'. The reviews started appearing.

I am now rechecking the review date for each review. This is a bit strange as the 'Review Date is a required field.

I will recheck and get back shortly.

#1237530

I checked. Each review has a review date. It is a required field.

#1237750

Okay is it possible there is more than one custom field called Review Date, and the wrong Review Date field is selected in the Ordering options? Sometimes this happens if fields are renamed or deleted incompletely. If that is not the case, I will need to take a closer look. Please provide login credentials in the private reply fields here and let me know where I can find this View on the front-end of the site.

#1237769

I checked the list of custom fields... found a field named 'Review Date' with the slug 'review-date' It was not linked to the Reviews custom post type fields group. Deleted it.

Then selected the correct field 'Review Date' with the slug 'reviews-date'. The reviews are now showing up.

Thank you for the help 🙂

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