function wa_posts_where_include_drafts_filter($where) {}

Filter to add more post statuses.


  • string $where: SQL statement to filter.

Return values

returns:Filtered SQL statement with added post_status for where clause.

Source code

function wa_posts_where_include_drafts_filter($where) {

	$where = str_replace("post_status = 'publish'","post_status = 'publish' OR post_status = 'future' OR post_status = 'draft' OR post_status = 'inherit'", $where);

	return $where;



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: