Featured Post showing draft post
- The topic ‘Featured Post showing draft post’ is closed to new replies.
Need help? Check out our Support site, then
Hello!
I selected Customize -> Featured Category and chose one of my categories of posts called “Travel Blog”. I have 7 posts in that category and only 1 of them is published, the other 6 are drafts. When I view my homepage the featured post is a draft post!
I expect to see my 1 published “Travel Blog” post as the featured post at the top (like your demo site’s “Imagination and Wonder” post) and a second post (different category) as the next post underneath (like your demo site’s “France: A History Lesson”).
I did not expect to see a draft post (“Leaving Los Angeles”) appear as a featured post!
Website: http://nofixedabode.life/
Please help :)
The blog I need help with is: (visible only to logged in users)
Found the problem. In content-featured.php your WP query uses the post_status “published”. “Published” is not a valid post status and so I guess WP is just returning all posts regardless of status.
I manually edited the code to use the post_status “publish” and that worked. Now I don’t see my draft post featured at the top of the page.
Thanks for sharing, we’ll be sure to fix that!