Skip Navigation

[Resolved] View isn’t returning all related posts.

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

Problem:
The problem this user is having is that their view isn't returning all the posts in the list.
Solution:
In this user's case when the view was checked, they were ordering the view by a custom field.

Unfortunately not all the posts has this custom field filled in which caused them not to appear on the frontend.

It is not possible to sort items that have a null value .

This support ticket is created 2 years, 8 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 11 replies, has 2 voices.

Last updated by gordonW-2 2 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#2113609
Screen Shot 2021-07-13 at 12.04.52 PM.jpg
Screen Shot 2021-07-13 at 11.48.41 AM.png
Screen Shot 2021-07-13 at 12.03.28 PM.png

Hello.

I have set up post relationships between two custom post types.

The post type "Looks" has related "products."

I have added 7 related products to a particular loop, however only 3 are being displayed.

attached are screenshots of the admin, frontend, and the debug window

The front end is showing the results of the query correctly ... but why isn't the query returning all 7 matching products?

thx

Gordon

#2113677

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Gordon,

Thank you for getting in touch.

Would you mind allowing me to have admin access to the site so that I can check on this issue for you in a bit more detail ?

I've enabled the private fields for your next response.

Thanks,
Shane

#2113697

oops

#2113699

Again, the "Inspirational Looks" pages are not always returning all of the expected results ... some are, but most aren't

The issue can be seen here:
Front End: hidden link
Back End: hidden link

#2113725

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Gordon,

Thank you for the link. However i'm not seeing where you've added the credentials for the site.

I've enabled the private fields.

Thanks,
Shane

#2113727

I’m using the plug in “ Temporary Login Without Password”

The link should allow but you access without credentials.

#2113739

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Gordon,

Usually it will provide a temporary login URL for me to use. I'm only seeing a link to the backend and frontend where the backend link is asking me for the login credentials.

Thanks,
Shane

#2113743

Weird. I put the link in the green form

#2113745

Send me the secure form again and I’ll try again.

#2113761

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Here are the private fields

#2114353

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Gordon,

The problem is caused by the sorting option.

As you can see from the notice that is displayed on the sorting option "The View will display only posts that have a value for that field."

It would appear that some of your catalogs don't have the Product Name custom field filled in. I did a test to confirm this by switching to sorting by the Post Date and all the items show up.

Thanks,
Shane

#2114845

My issue is resolved now. Thank you!

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