WPBeginner wrote a nice post today, how to create a separate page for blog posts. And we appreciate WPBeginners great posts, but before you start to use their solution, here is a 3 second solution to make this work faster, I hope WPBeginner doesn’t mind:
Create a new file and call it blogpage.php or whatever you like. Add this code:
Then write a new page, for example Blog, leave the content empty, select the template Blogpage and publish the page. After that, select “static page” in “Reading Options”. That’s all!
If you work with WordPress 3.0 already, you can use this code:
Comments
3 responses to “Create a Separate Page for Blog Posts in WordPress”
You can also use the Template from the WP Basis Theme; see the source for example.
Two questions follow.
Scenario:
Because of an immense amount of php code and jquery widgets that php plugins weren’t able to handle, I created a static page by saving the the page source of a wordpress page, inserting the php code, saving it (new.php) uploading it to root of site, creating a wordpress page (home2), pointing home2 to new.php using the “Pages Link To” plugin (http://wordpress.org/extend/plugins/page-links-to/) and then finally setting the newly created wordpress page (home2) that points to the static page (new.php) using this method: Settings=>Reading=>Front Page displays A Static Page (home2) (http://codex.wordpress.org/Creating_a_Static_Front_Page)
Here are my questions:
Question 1:
It appears that although new.php is not part of wordpress, the search engine works on the site. Why and how?
All the html states is that it is a form searching my site:
How can the searchbox actually work if new.php does not make any reference to the database?
Question 2:
Why does the right sidebar disappear if I put new.php in any location other than root of the site?
I am using:
Wordpress 3.0
Atahualpa 3.4.9
Also, although using 3.0 (appears to work), I have given my site its own directory:
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
However, I have experienced similar ‘issues’ no matter version and template.
Hi there. Nathan Rice’s tutorial (specially the 2nd solution) is the best solution for themes with home.php 🙂
http://www.nathanrice.net/blog/creating-a-blog-page-with-paging/