loop – How do I set the Stewart Search Template to return only published posts in the result

Question

I recently took a WP.com online webinar and the moderator referred me here to ask my question. I am trying to redesign my site using FSE. I am using the “Stewart” theme.

I have added a search block to my page to provide for word searches – the intent is that a word search will return a display of all published posts including the search term. The problem is that the results being returned also include draft posts. I have checked on my wife’s tablet (she has no account so is not logged in to anything) to verify that this is the case for anyone coming to my site. If you do the search, [https://test.redesign.primepassages.com/?s=beer] you will see some post titles with no featured image. These are unpublished draft posts.

I am using the standard WordPress Search Block (no plugin involved). The Query Loop I am using is set by the standard Stewart Search Template – I cannot find any settings where I would filter the results to display only published posts.

The Stewart Index and Archive templates work fine – they filter for published posts as expected.

I need help with how to set the Stewart Search Template to return only published posts in the result.

https://test.redesign.primepassages.com/?s=beer

0
Kevin 4 months 2022-04-02T11:00:30-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse