Create a static wordpress page

After a lot of failures,i successfully learnt how to build a real static wordpress page.(like http:// mywordpresssite/mypage.php).

Here are the steps,

Step 1: create a text file

step 2:add this code at the top of the file

<? require( dirname(__FILE__) . ‘/wp-load.php’ );

include(“wp-content/themes/default/header.php”); ?>

(Replace the default theme with your own theme name)

step 3:put your contents from the next line

step 4:when you are finished adding contents,add these  lines at the end

<?
include(“wp-content/themes/default/sidebar.php”);
?>
<?
include(“wp-content/themes/default/footer.php”);
?>
</body>
</html>

(Replace the default theme with your own theme name)

step 5:save the file as pagename. php

(Replace your pagename with your own one)

step 6:upload the php file to you server at the root directory where wp-login.php is present.

Now your page can be accessed at http://your site.com/pagename.php.

That’s it….

Random Posts

Post a comment

Copyright © TLDblogger.com