Skip Navigation

[Resolved] View finding no results

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

Problem:

I have a view I set up, and it's saying there's no results when there are definitely some active posts for the post type it should be listing.

Solution:

You are ordering the results by custom field "Status", so all "Property" posts need to be setup the custom field "Status", if there isn't custom field "Status", it will not be outputted in the results, you will get the problem:
no results

You can change it to order by "Post date", and test again.

Relevant Documentation:

https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

'meta_value' - Note that a 'meta_key=keyname' must also be present in the query.

This support ticket is created 6 years 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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 6 years ago.

Assisted by: Luo Yang.

Author
Posts
#689379
view-settings.png

I have a view I set up, and it's saying there's no results when there are definitely some active posts for the post type it should be listing. The results page is here:

hidden link

It has a search, but regardless of what you search, or even with no search, it's coming up with no results. Attached is a screenshot of the View settings page. Any idea what's up?

We are using a post child relationship, with Apartments as a child of Properties. This is the first time I've used a post child relationship, so not sure if that's related. I know you guys are re-working the post child relationship, do you think switching to the beta version where that's changed would be a good idea?

#690173

Hello,

Thanks for the details, I can login your website, the problem is in the view "Property Search Results"
hidden link

section "Ordering", you are ordering the results by custom field "Status", so all "Property" posts need to be setup the custom field "Status", if there isn't custom field "Status", it will not be outputted in the results, you will get the problem:
no results

You can change it to order by "Post date", and test again.

More help:
https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
'meta_value' - Note that a 'meta_key=keyname' must also be present in the query.

#694419

Thanks, got it working now.

#695148

You are welcome

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