Code: Add Recent Comments and Top Comments to WordPress

June 19th, 2009

Code Snippets, WordPress Tutorials

Throughout our WordPress code series, we’ve been providing a number of code options for designers who want to use actual code rather than using the widget system built into WordPress.

In this post, we’ll be providing the code for creating both recent comments and top comments to the sidebar of your WordPress blog. Read the rest of this entry »

Code: Displaying Updated Posts in WordPress

June 19th, 2009

Code Snippets, WordPress Tutorials

In the past we’ve discussed how to add recent posts to your WordPress blog manually using code, but for blogs that are regularly updating older posts (there are a surprising number of these), here is some code that you can instead use to only show the most recently updated posts in WordPress!

Here is the code you’ll want to place in your sidebar.php file where you want the updated posts to display: Read the rest of this entry »

Code: How to Display Recent Posts in WordPress

June 19th, 2009

Code Snippets, WordPress Tutorials

Although most current WordPress installations include a widget for displaying recent posts, there are quite a few people that prefer to get their hands dirty and manually code things.   If you’d like to learn how to display recent posts in WordPress, you’ve come to the right place!

Here is the code you’ll need to display recent posts.  Simply copy the following code and place it in your sidebar.php file where you want the recent posts to be displayed! Read the rest of this entry »

Code: Add a “Tweet This” Button

June 19th, 2009

Code Snippets

Twitter has taken the blogosphere by storm over the past year, causing many bloggers to look for ways to leverage additional traffic from others who use Twitter.     One of the best ways we’ve found to accomplish this is to add a “tweet this” link below your blog’s posts as a reminder to your readers to share what they just read with others!

If you’d like to add a “tweet this” button to your blog, it is extremely easy!   Here is the code you’ll want to use:  Read the rest of this entry »

Code: Add an “Email This” Button

June 19th, 2009

Code Snippets

When building a blog that offers a lot of useful content and resources (rather than opinion), we strongly recommend blogs offer an easy way for readers/users to email your content to their friends and family.

If you’d like to do this on your blog, this is actually pretty easy!   The following code is designed to allow readers to click on the button and have it open up their default email software. It wil even create a subject and link that points to the post the reader is currently visiting!   Here is the javascript code you will need: Read the rest of this entry »