Creating external WordPress Page

There are times when we need to create a fresh blank page for our WP which does not contain any header, footer or sidebar. Just put this PHP line:

require_once(‘./wp-blog-header.php’);//same folder with WP main files

Example:

<?php
require_once(‘./wp-blog-header.php’);
query_posts(‘showposts=5’); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<h2><a href=”<?php the_permalink(); ?>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?></a></h2>
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>

Prev PostStreamyx Modem/Router Passwords
Next PostHow to upgrade your wordpress and not getting blank page

Leave a reply