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

Dear fellow Malaysians, if you like the content of this blog and thinking about to support me to continue writing good content, please consider to sign up for Takaful service from me. I am offering life & accidental coverage plans and medical card too. Kindly message me using the PM box on the sidebar (under profile picture). Thanks ;)

Leave a Reply

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