-
nest9
Hi there,
I have created a custom no search result page where I am displaying random posts below the search bar using a query loop. Within the query loop setup, there is an option to select the post type. Initially, I configured it to display only one specific post type, which worked as expected.
However, my requirement now is to display the latest posts from all post types, including custom post types. When I attempt to achieve this by adjusting the query parameters to include custom post types along with regular posts, the page does not display any results.
Could you please assist me in configuring the query loop to effectively display the latest posts from all post types, including custom post types, on my custom no search result page?
-
David
Hi there,
in the Query Loop settings, do not set any Parameters, just check the Inherit Query from Template, this will then return any posts that match the search query
-
nest9
I’ve checked the ‘Inherit Query from Template’ option on the search result page, and it’s working fine. However, the issue is that when I check this option on the ‘no search result’ page, nothing shows up.
-
Alvind
Hi there,
You can follow the instructions here to include multiple post types in the query loop.
-
nest9
Issue resolved perfectly. Thanks for your guidance!
-
Alvind
You’re welcome!
- You must be logged in to reply to this topic.