Making your home page without the blog.
-
I have seen many questions about making your home page like a regular page or exclude the blog etc… This is my way of doing it:
I made a “Home” page under the wordpress pages and I took note on its page id. Lets say it is “?page_id=11”.
All I do is re-direct the user to this page when they first come to my site.
I place this code at the very top of the “header.php” file in whatever theme folder you are using (wp-comtent -> themes – > YOURTHEME):Before placing this code in your page make sure that your premanent links settings are set to default.
<?php if(!isset($_GET['page_id']) && !isset($_GET['s']) && !isset($_GET['p']) && !isset($_GET['feed']) && !isset($_GET['cat']) && !isset($_GET['m']) && !isset($_GET['tag']) && !isset($_GET['author']) && !isset($_GET['attachment_id']) && !isset($_GET['paged'])){header("Location: /?page_id=11");} ?>
Make sure you change the page_id number to match your page!
* I am pretty sure I got all of the $_GET elements.. But, I may have missed one.
- The topic ‘Making your home page without the blog.’ is closed to new replies.