php - How to display private (or draft) Wordpress blog post outside blog -


i wordpress use edit tool , website renderer, don't want posts created website display on blog. did on website:

  • created private post
  • put on website this:

    define('wp_use_themes', true); require('blog/wp-load.php');

    $args = array( 'post_status' => 'private', 'p' => '3019' ); query_posts( $args );

    ?>

unfortunately not work.

when set p post id published works. when publish private post public works too. when post private not work.

what make work?

i think use get_posts easier.. http://codex.wordpress.org/template_tags/get_posts


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -