Skip Navigation

[Resolved] The newest custom post is not displayed in archive layout (filtered or not)

This support ticket is created 7 years, 5 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by Nick Pasadakis 7 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#452753
layout.png
view1.png
view2.png
view3.png
view4.png
unformated output.png

I am trying to: display all the (custom type) hotels

I visited this URL: hidden link

I expected to see: All the Hotels

Instead, I got: All the hotels EXCLUDING the latest one I entered. (hidden link)
I guess the problem is the same as in this thread which has not being resolved. https://toolset.com/forums/topic/newest-custom-post-not-appearing/

From the debugging information I got the following MySQL query:

SELECT   wp_posts.* FROM wp_posts  LEFT  JOIN wp_icl_translations t
							ON wp_posts.ID = t.element_id
								AND t.element_type = CONCAT('post_', wp_posts.post_type)  WHERE 1=1  AND wp_posts.ID NOT IN (454) AND wp_posts.post_type = 'hotel' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private')) AND ( ( t.language_code = 'en' AND wp_posts.post_type  IN ('post','page','attachment','hotel' )  ) OR wp_posts.post_type  NOT  IN ('post','page','attachment','hotel' )  )  ORDER BY wp_posts.post_date DESC 

As you can see the selection of the latest (custom) post is explicitly excluded (

wp_posts.ID NOT IN (454)

) for some reason.

#452948

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Could you please try to uncheck the checkbox from section "Query Options" as shown in the following screenshot and try to resolve your issue.
=> hidden link

#452999

Thank you that did the trick.

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