Code: Display Last Modified Date in WordPress

If you run a website or blog professionally, it is always good business practice to update your older posts to keep them as valid and current as possible.   This helps retain (or even grow) their search engine positions, and helps keep your blog from having dead links or outdated content. 

One of the things I recommend readers do on these types of blogs which use WordPress is to adjust the date field to instead show the last modified date.   This way posts that were written two years ago won’t have that date if you’ve updated them more recently!

Here is the code you’ll need to easily accomplish this.   As always, you’ll want to make a backup of your single.php file (or any files you will be changing) before proceeding.

[Read more...]

Code: Adding Edit Buttons to WordPress

There are a growing number of premium themes on the market these days for WordPress users, many of which are extremely advanced, yet I’ve found that many designers fail to add some of the most basic things all themes should have.  One of the things many designers forget to do is code ”edit” buttons on their posts, pages, and comments.  

For those unfamilar with these buttons, they only show up for people who are logged into the admin panel (readers can’t see them).   When clicked, you are routed directly to the post/page or comment within the admin panel so you can edit the post.   It has been my experience that having access to these buttons can save a lot of time when trying to manage and update older posts. 

[Read more...]

Code: Display Categories and Archives in WordPress

There has been some debate by bloggers over the past few years as to the value of displaying your archives, with some bloggers going as far as to not even display their categories!    The general idea is that the use of recent posts, popular posts, and a built-in search feature will allow your readers to find what they are looking for.

Well, I for one still believe that categories and archives should be displayed on blogs.   If you’d like to do the same for a WordPress blog, here is the code you’ll want to use.   For your convenience, we’ve provided two options for each:  traditional display and drop-down menus.

Simply paste the WordPress code below in your sidebar.php file where you want the category or archives to display: [Read more...]

Code: Add Recent Comments and Top Comments to WordPress

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 more...]

Code: Displaying Updated Posts in WordPress

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 more...]