If you are looking for a way to separate your blog posts from the rest of your site, or if you would like to add an easy way to access all recent posts…. keep reading.
WordPress has a built-in feature that allows you to assign a Page as your Static Homepage and another Page as your Post Page. But this feature does not work well for all themes because it assumes that index.php (your homepage) contains your list of recent posts. Therefore, when you create a new Page called “Blog” and assign that as your Post Page…. what happens? The “Blog” page will look exactly like your homepage.
This method works great for themes that only have posts on the homepage. But if your theme contains other homepage elements such as Image Sliders, Highlights sections, etc. you may not want those elements appearing on your “Blog” page. This is when you will want to create a Page Template dedicated to displaying a list of your recent posts. Here’s how:
1) Open a new text file and add this to the very top of the file:
Template Name: Blog Template
2) Next, copy and paste the entire contents of your archive.php page into your new text file, directly below the code mentioned above. (Most themes contain an archive.php file which defines how the list of recent posts should be displayed. Different themes may call this file something else but in most cases, it is archive.php.)
3) Within the newly pasted code, search for the start of the loop: It begins with:
<?php if (have_posts()) : ?>
Directly ABOVE <?php if (have_posts()) : ?> paste your query parameters. For a list of all recent posts, you would paste:
<?php query_posts(‘showposts=10’); ?>
You can change the “10” to the number of posts you want to show per page. You can also change this query to show posts from specific categories like:
<?php query_posts(‘cat=12,5’); ?>
4) Save this file as: template_blog.php and upload it to your theme folder.
5) Create a new page where you wish to display your posts and give it a name such as “Blog”, “Posts”, “Latest News” …etc. On the right side of the Page edit screen, select Blog Template from the Templates drop-down menu. Click Update to save.
Now your latest posts will display on this Page!
All of our themes are compatible with the new WordPress 3.1. Please note however, the new addition of the Admin Bar on your site’s front end may cause the normal page elements to appear 28 px lower. This is only visible to you, the admin, when you are logged in. If you log out, the page appears perfectly aligned as usual. *Note the addition of wp-includes/admin-bar.php
If you wish to remove the new 3.1 Admin Bar from appearing on the frontend of your site when you are logged in, please do one of the following.
1) Go To “Users” and uncheck the box next to “Show Admin Bar” This will only affect the Admin Bar setting when you (being that specific user) are logged in.
2) If you have multiple users and wish to disable the Admin Bar for ALL users without having to change this option in each one’s User settings, open functions.php and add the following code:
add_filter( 'show_admin_bar', '__return_false' );
If you would like to remove the “Show Admin Bar” checkbox option and prevent it from displaying in the “Users” section entirely, add the following code to functions.php
remove_action( 'personal_options', '_admin_bar_preferences' );
At this exact moment, WordPress has been downloaded a total of 10,718,399 times according to the official WordPress Download Counter. This number increases by the second, spreading like wildfire across the world’s community of web designers, programmers, business owners…. down to the individual blogger. WordPress is great, not just because of its intuitive design, elegant coding and the fact that it’s free, WordPress is amazing because of the tremendous community that continues to grow around it.
So many people to acknowledge… first and foremost, the team over at Automattic – the engine that keeps the ship moving. How about the contributing coders and beta testers who bring a whole new meaning to the term “think tank.” And a huge shout out to the plugin developers who make our lives oh so much sweeter and more functional.
As theme developers, we have the fun job. We get to dress up the beast and make it pretty. But with thousands of themes out there, we are reliant on the unofficial WordPress “press core” to bring meaning, cohesion and order to it all. Here at WP Now, we would like to acknowledge a few of these bloggers and thank them for their commitment to our community:
What WP guru would you like to give props to?