Skip Navigation

[Resuelto] View data not showing up

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

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 hace 5 años, 7 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Etiquetado: ,

Este tema contiene 7 respuestas, tiene 2 mensajes.

Última actualización por prasadS hace 5 años, 6 meses.

Asistido por: Christian Cox.

Autor
Mensajes
#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: enlace oculto

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 🙂