Skip to content

Instantly share code, notes, and snippets.

@jordanandree
Created September 22, 2010 19:48
Show Gist options
  • Save jordanandree/592399 to your computer and use it in GitHub Desktop.
Save jordanandree/592399 to your computer and use it in GitHub Desktop.
<?php
// needed to load WP core
include '../../../wp-config.php';
if($_GET):
$id = $_GET['id'];
query_posts('p='.$id);
if(have_posts()): while(have_posts()): the_post();
// do some template hooks here
?>
<h2> <?php the_title(); ?></h2>
<?php the_content(); ?>
<?php endwhile; wp_reset_query();
else:
// no posts
echo 'No posts';
endif;
endif;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment