A lot of themes these days comes with the Recent Posts code added already. It’s a basic list, usually just set to display the last 5 or 10 posts. A nice list but are you making the most of it?
Remove the current Post
A recent posts list comes into its own when the user is on a single post page. It allows them to see the most recent posts you’ve written on …
You may have used a theme in the past, or are currently using one, that has a functions.php file in it. The Theme Functions file was introduced around the time that widgets came on the WordPress scene, usually containing just the code to register the dynamic/widgetised sidebars, however they’re useful for so much more. If you don’t already have a functions file then just create a blank file in your theme directory …
This is the time of year when bloggers go scrambling through their code, updating the copyrights on all their pages to something like this:
Copyright © 2009 Example Blog, Inc.
And unless they completely rewrote their website on January 1, this is wrong. Some use a more all inclusive notice:
Copyright © 2001-2009 Example Blog, Inc.
As common as this is, it’s not particularly accurate. The range may be true for the entire blog, but on an individual post’s page (like that first one you wrote in 2001 and never touched again) it’s likely not.
It would be better if the copyright at the bottom of the home page was for the entire site, and on other pages it reflected what was on that page. Better still, we’d like it to all happen automatically at the stroke of midnight on January 1. That’s what I’m going to show you how to do, using WordPress.
A new template tag was introduced for WordPress 2.7 to provide different functionality for generating your page navigation. For earlier versions, and still for WordPress 2.7, we have wp_list_pages(), however for 2.7 we now have wp_page_menu().
This function simplifies some of the aspects of generating a list of static pages. The parameters that it takes in are:
sort_column
Sorts the pages into the specified order. Values can be post_title, menu_order, post_date, post_modified, ID, …
A few weeks ago I wrote about the WordPress 2.7 theme enhancements and specifically how the comments were now output using the tag wp_list_comments(). However, this controls all output of your markup and for a lot of people, this is different to how their existing theme is.
Just a reminder, default output is:
[sourcecode language="html"]…
As you know, Digg is a powerful social website which can send more than 10,000 visitors to your blog if your article is pushed to the front page.
We can easily add the Digg button to our posts. All you need to do is simply copy the code and paste it into your template file and then the Digg button will appear in every post. But what if you only want the Digg …
In WordPress having a custom style for a static Page is fairly easy when you use Page Templates, however the same is not so straight forward for your posts.
You may wonder why you would want to style some posts differently to others. WordPress is now so much more than just a simple blogging platform. You can use it as a fully fledged photo gallery, as a CMS for your …