Show recent published posts

The arguments you are using are wrong. They should be: $args = array( ‘numberposts’ => ’10’, ‘post_type’ => ‘post’, ‘post_status’ =>’publish’, ‘tax_query’ => array( ‘taxonomy’ => ‘category’, ‘field’ => ‘id’, ‘terms’ => array( 10, 11, 57 ), ‘operator’ => ‘NOT IN’, ) ); Or shorter: $args = array( ‘numberposts’ => ’10’, ‘post_type’ => ‘post’, ‘post_status’ … Read more

Changing post status

That code is part of something bigger, as there are many places where the custom post_status needs to be inserted. There are two interesting discussions here at WPSE and both point to the use of this plugin: Edit Flow. Is it possible to have more “levels” of draft/published statuses? Add a new post status in … Read more

Comments Feed & Custom Post Statuses

Found the filter: comment_feed_where to filter the WHERE clause, which by default only looks for posts with status = publish. function comment_feed_where_status($where) { return str_replace( “post_status=”publish””, “post_status=”publish” OR post_status=”resolved” OR post_status=”unresolved””, $one); } add_filter(‘comment_feed_where’, __NAMESPACE__ . ‘\\comment_feed_where_status’); I found this by debugging with “SAVEQUERIES” enabled and dumping the queries array on the feed page.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)