Does WordPress remove draft status automatically?

Just by itself WordPress will not change the post status. However, if you have a plugin like Draft Scheduler installed, drafts will be published automatically, possibly with some interval. So, you should check your plugins on this type of activity. Another possibility would be that a backup of the database has been installed after a … Read more

plugin for wp_list_categories with posts

The code that thread links to seems very close to what you are describing – looping through categories and retrieving some amount of posts for each. If you want to integrate posts into wp_list_categories() you can do that by extending Walker_Category class and using it as custom walker passed via walker argument… but it’s not … Read more

Creating a Post form outside of the Admin

Ok I have cracked it, by spoofing the $_SERVER variable and pre-defing some constants, I was able to prevent WordPress from redirecting after the inclusion of wp-load.php. define(‘WP_USE_THEMES’, false); define( ‘DOMAIN_CURRENT_SITE’, $siteRow[‘domain’] ); define( ‘PATH_CURRENT_SITE’, “https://wordpress.stackexchange.com/” ); define( ‘SITE_ID_CURRENT_SITE’, 1 ); define( ‘BLOG_ID_CURRENT_SITE’, $siteRow[‘wp_blog_id’] ); $_SERVER = array( “HTTP_HOST” => $siteRow[‘domain’], “SERVER_NAME” => $siteRow[‘domain’], “REQUEST_URI” … Read more

How to Customize number of blog posts on first page?

There is no option to change the number of posts per page, archive, tag or category from the admin but you can use query_posts() posts_per_page to set the number. for example in your theme’s index.php file or if you are using a static page as your home_page the page.php file add this snippet of code … Read more

Use Cron to modify posts via sql

Creating your own schedules is a little messy (because they need to be persistent and stored in database), but it is quite easy to hop on one of the native schedules that run twice a day. add_action( ‘wp_version_check’, ‘my_function’ ); function my_function() { //stuff } As for running actual queries you should use $wpdb for … Read more