Blog posts not displaying

From the “Settings” menu in the wordpress admin panel Select the “Reading” options and select your blog page for “Posts Page” from the dropdown beside it, see the screenshot here http://d.pr/i/h4nV Hope it will help

Change Post Status From Front End

Simply replace wp_delete_post( get_query_var( ‘postid1’), true ); with wp_update_post( array( ‘ID’ => get_query_var( ‘postid1’ ), ‘post_status’ => ‘draft’ ) ); That is assuming that the rest of your logic does already work.

Force authors to Preview a post before publishing

This is completely untested but I think the concept is good, and good idea too though I’d have an angry mob with pitchforks to face. Set a marker for your post when the post is previewed. You can save it in either $wpdb->options or $wpdb->postmeta. I haven’t quite decided which would be better, and it … Read more

Display post x of y within category

Raw SQL is inconvenient. You can use get_posts() (or WP_Query which it wraps) with ‘fields’ => ‘ids’ (see fields parameter ) for lightweight counting, while retaining compatibility with all arguments it accepts, including category parameters

How to list recent posts in a wp nav menu?

What about checking the ID value of each menu item like the following: if( $item->ID === 45): // ADD THIS MENU-ITEM ID CHECK // Query the lasts ten category posts $category_ten_last_posts = array( ‘posts_per_page’ => 11, ‘category_name’ => ‘mamba’, ‘orderby’ => ‘date’, ‘order’ => ‘DESC’ ); $posts = get_posts( $category_ten_last_posts ); foreach ( $posts as … Read more