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; ?>

Caruman TAKAFUL serendah RM15, manfaat sehingga RM2 juta. Promosi hujung tahung, ending soon!
Wasap SEKARANG!

Leave a Reply

Your email address will not be published. Required fields are marked *