Posts Tagged ‘tutorial’
How to add Related Posts with (or without) Thumbnails to your WP Blog
July 20, 2009 by Emily
Tutorials
Adding related posts to your blog is a great way to help your readers find other posts on your site that interest them. And if you have ads, increasing the number of pageviews on your blog can turn out to be quite lucrative. I recently had a request from a client to use a certain widget that she had seen on many other blogs that adds a list of recent posts along with a thumbnail image from that post. But after looking at the widget and researching the many other plugins that are available to add this functionality, I decided I wanted to find a way to code it directly into the template.
One reason for this is that the more plugins installed on a blog, the more that can slow down the loading time of that blog. If you can hard-code a function into the template, it’s almost always preferable to using a plugin. Plus many of the plugins or widgets I looked at gave very little control over things like styling or where the list appears in the template or even how they even figured out what was “related”. What if you want them to be related by tag instead of category or vice versa? What if you just want other posts by the same author?
After doing some more googling and modifying some of the code I found I figured out how to do everything I wanted to and more. My client was extremely pleased with the results and was amazed that I’d even been able to implement it without using a plugin or the widget she had originally wanted:
“It IS cool! A zillion people are going to see it now and want it on their WP blogs! Thanks!”
Which leads us to this post. I thought I would share my findings so that you can implement the same feature on your own WordPress blog. Below I will show you how to add related posts by category, tag or author. I will preface this by saying you should probably have some very basic knowledge about how to edit a template in WordPress, but for the most part, you can copy the code directly and paste it into your template. That’s it. For people with more advanced knowledge I’ll point out things that you can edit further and customize to your liking.
Beginners Guide to WordPress Plugins
January 14, 2008 by Emily
Tutorials
One of the biggest advantages of using WordPress is the ability to use plugins to expand the capabilities of your blog or website. Since WordPress has such a large community of plugin developers, it means that you can make your WordPress website do pretty much anything you want it to. If you’ve ever thought about a feature that you wanted in WordPress, chances are that if you look around, you’ll find someone who has created a plugin to integrate that feature.
The problem is that many people don’t know how to go about installing plugin or think they are not technologically inclined enough to be able to. But these days most of the plugins available for WordPress only require one or two steps to get working so anyone can do it.
If you read my other tutorial about Upgrading WordPress then you will be familiar with the basics. You will need an FTP client to connect to your web space. If your host used cPanel, you can also use the file manager and upload plugins from there. Most plugins are installed in the same place, a folder called ‘plugins’ inside the wp-content directory.
To activate or deactivate a plugin, you just need to log into your WP admin and find Plugins in the top menu. This page lists all installed plugins.
The really great thing about the newest version of WordPress is that it will keep track of most of your plugins and let you know if they need to be updated.
Upgrading Wordpress
June 21, 2007 by Emily
Tutorials
It’s no secret that we’re partial to WordPress around here. We use it for our own websites and for the majority of our client’s site. WordPress is so great because it’s so multi-faceted and can be used for so many types of projects, not just for blogs. Plus it’s free, which is always a big plus.
Another great thing about WP is how easy it is to use. One thing I’ve noticed though, is that many beginners are apprehensive about some of the basics of WordPress, like installing, upgrading, and adding themes and plugins. They think doing these things are difficult or complicated, but in fact they are REALLY easy to do. And as a WordPress user these are things you should know how to do yourself. Especially upgrading. Having the most recent version of WP installed is always the most secure option. Upgrading takes all of 5 minutes and not upgrading can open yourself to a world of pain if your site gets hacked.
The WP Codex is a great source for instructions on how to do these things, but I still get the same questions over and over, so I’m left to assume people don’t know it exists or they find the instructions in it dense or intimidating. I remember the very first time I tried to install WordPress years ago, following the codex instructions to a ‘T’ only to get waylaid when it told me I needed to set up a database. I remember thinking, “What the heck is a database?” I still get this question all the time from new clients, most don’t even know that WP runs on a database.
With that in mind, I’ve decided to do a series of tutorials for WP beginners. I’ll go through some basics as well as some important features and maybe some things you didn’t even know you could do with WordPress. Please feel free to comment and ask any WP related questions you have because I’ll be happy to answer them.
For my first tutorial, I’m starting with one of the most important things: upgrading WordPress. And wouldn’t you know, a new version of WP was just released today, so it’s the perfect time to learn.
Preparing for the Upgrade
First of all, you need to get yourself an FTP program. There are a TON of free ones out there and they work pretty much the same. There’s window with your local computer files and there’s a window with your server files. You transfer files between the two windows. Easy Peasy. I recommend SmartFTP. It’s free and it’s easy to use. But did you know that Internet Explorer has built in FTP? I still prefer SmartFTP, but if you already use IE, then this might be easier for you. Here’s instructions for FTPing in IE. Firefox also has a nice FTP client you can install if IE isn’t your thing.
Second of all, you need to back up your current site. VERY VERY VERY IMPORTANT. You should be backing up your site regularly (at least monthly) whether you’re upgrading your site or not. Don’t expect that your host does it for you (although they should), because if there was some kind of catastrophic server failure you could lose EVERYTHING and they would not be at fault (seriously, check the fine print). Most hosts provide a back up option in your website admin (cPanel, Plesk, etc). Swank Web Hosting uses cPanel (as do a majority of hosts). To back up your site in cPanel, login (the cpanel address is usually yourdomain.com/cpanel) and find the icon or link that says Backups. Yes, it really is that easy. Click the ‘Download a home directory Backup’ link and download to your computer. This could take a little while if you have a lot files and/or a slow connection. Then click on the database link(s) under “Download a MySQL Database Backup”. It’s super important that your have a backup of your database. This is where pretty much ALL of your WP info is stored: posts, comments, categories, links, options, users. The only things not stored in the database are your themes files, images and plugins (which is why you did the home directory back up as well). If something goes wrong then all you have to do is come back to this page and upload your backups in the ‘Restore a Home Directory Backup’ and ‘Restore a MySQL Database’ fields. Yes, it really is that easy! If your host doesn’t use cPanel and/or you can’t find the place to perform a backup, then contact them and ask where it is. If you host doesn’t give you this option, then it’s time to find a new host.
A Sidebar
There are really two kinds of WP upgrades. There is a version upgrade, which would be like going to 2.1 to 2.2 and there’s a security (or bug fix) upgrade, which would be 2.2 to 2.2.1. The upgrade they released today is the latter. A version upgrade can be more complicated because it usually introduces new files and features and there could be plugin/theme incompatibilities. A security upgrade is just fixing issues with certain files and it can only make WP work better, there is very little chance of a security upgrade messing up your blog. I’ll detail how I do both kinds of upgrades.
Starting the Upgrade
Download the newest version of WP, of course, and unzip it. They always announce new versions in the Dev Blog, which will show up in your WP dashboard or you can subscribe to it via RSS feed.
Connect to your server from your FTP of choice. Your host will have sent you the info you need:
Your FTP address – typically this is just ftp.yourdomain.com, though you may also connect directly though your IP Address.
FTP Username and Password – If you have cPanel this is usually the same login info.
Once you’re connected find the folder that your WP files are installed. This varies from host to host, but they are usually in a ‘public’ directory. For Swank Web Hosting customers and many others, the files will be inside ‘public_html’, but I’ve seen it called ‘public’, ‘http’, ‘www’ and ‘home’. Either way WP files are easy to spot. All WP folders are called wp-something and files are wp-something.php click on folders until you find them.
If your doing a security upgrade (2.2 to 2.2.1):
Upload all the files and folders to your server and overwrite the old files. If you do it this way, it overwrites any files that need to be updated, but if you have other files (theme files, plugins, images, etc.) it just leaves those alone.
A couple things to be careful of:
- If you’ve updated the default theme at all, DO NOT overwrite it with the new files. Theme files are located in wp-content/themes, before your upload, remove the themes folder completely.
-Never ever ever, overwrite wp-config.php. This connects your blog to your database. Leave this file alone.
Once all the files are overwritten, go to your browser of choice and put in:
http://yourdomain.com/wp-admin/upgrade.php
You should get a white screen that tells you that your database is being upgraded and to click on Next. Do what it says.
Annnndddd… your done. IT REALLY IS THAT EASY!
Log in to your admin and make sure everything seems to be working. It should be. There’s very little chance of plugin/theme incompatibilities between security updates. If you do have a problem, then it’s usually because it was a badly written plugin. The good thing about WP 2.2 is that it will automatically turn off any plugins that are causing problems (so you won’t get what I like to call the “white screen of death” anymore).
If your doing a version upgrade (2.1 to 2.2):
This is a slightly more complicated upgrade, but mostly because it involves extra precautions, not extra work.
Log into your wp-admin first and click on Plugins. Deactivate all your plugins. 2.2 has a handy ‘Deactivate all Plugins’ link, but for previous versions you’ll have to do it one by one.
Go to your FTP client, connect and find all your WP files on your server. DELETE wp-admin, wp-includes, and all wp-something.php files EXCEPT wp-config.php. DO NOT delete the wp-content folder. Also if you’ve made any other sorts of modifications to certain files or folders, it goes without saying that you shouldn’t delete those or overwrite them. But for the most part you shouldn’t have anything in your wp-admin or wp-includes folders that you made modifications to (and if you did you then you probably don’t need to read this tutorial).
Then upload all the new WP files. Again, you can overwrite your wp-content folder, but if you’ve made any modifications to the default theme, don’t overwrite it.
Then just follow the same instructions as above. After the upgrade is complete, log back into your admin and go back to Plugins. Activate them one at a time and make sure they aren’t causing any problems with your theme or admin area. If you get the ‘white screen of death’ then just go back to your FTP client and find the plugin you just activated (inside wp-content/plugins) and delete it.
People always freak out about this aspect and it seems to be one big deterrent to upgrading, but it shouldn’t be. If you are using well made, regularly updated plugins this really shouldn’t be much of an issue. I’ll talk about plugins in my next post and expand on this issue.
Now, I’m off to upgrade all my sites. You should do the same. I have 5+ wordpress sites and I can upgrade them all in about 10 minutes total. The more you do it, the more comfortable you’ll get and you have the added benefit of getting familiar with WP files and file structure which will help if you want to add themes or plugins in the future.

















