Preview Post/Custom Post types in Archive

The get_posts method of WP_Query is what does the heavy lifting as far as getting the posts to display. Before it does anything, however, there’s a hook called pre_get_posts that you can hook into. The hooked function will receive a reference (pointer) to the current query object. So you can change the query vars to be whatever you’d like.

So…

<?php
add_action( 'pre_get_posts', 'wpse33020_pre_get_posts' );
function wpse33020_pre_get_posts( $query_obj )
{
    // get out of here if this is the admin area
    if( is_admin() ) return;

    // if this isn't an admin, bail
    if( ! current_user_can( 'manage_options' ) ) return;

    // if this isn't your slide post type, bail
    if( ! isset( $query_obj->query_vars['post_type'] ) || 'slider' != $query_obj->query_vars['post_type'] ) return;

    // change our query object to include any post status
    $query_obj->query_vars['post_status'] = 'any';
}

You’ll probably have to change your post_type from slider to whatever you slider CPT is named.

As a plugin: https://gist.github.com/1343219

error code: 523