So you have finished up your theme, all the design elements are in place and you're happy with how it looks and works. But are you really done? There are so many little things that can easily be over looked.
Lets take a look at some of them and see what we can do about it.
1. Take Control of Your Email
Nothing says unfinished quite like one of your users getting an email from your site and having it say it's from "WordPress" and be some nondescript email address. Thankfully with just two filters we can tackle this issue.
<?php add_filter( 'wp_mail_from', 'new_mail_from' ); function new_mail_from( $email ) { $email = '[email protected]'; return $email; } add_filter( 'wp_mail_from_name', 'new_mail_from_name' ); function new_mail_from_name( $name ) { $name = 'My Cool Wordpress Site'; return $name; } ?>
The code above should be easy to follow. Both functions have only one argument, either the name or the email address. We take that variable and add our own name or email then return it. Depending on your needs these functions can be this simple, or get extremely complex setting different names and return emails based on forms, pages, user status or anything else.
2. Master the Excerpt
There are many things that can be done with the excerpt from filtering it before it's saved to controlling its length. We are going to talk about two excerpt filters: excerpt_length
and excerpt_more
The default excerpt length is 55 words, don't get this confused with characters. To change this value we can use a simple function such as:
<?php add_filter( 'excerpt_length', 'my_excerpt_length' ); function my_excerpt_length( $len ) { $len = '22'; return $len; } ?>
But we can take this one step further and use a custom meta field to allow the post writer to set the excerpt length per post.
<?php add_filter( 'excerpt_length', 'my_excerpt_length' ); function my_excerpt_length( $len ) { global $post; if ( $custom = get_post_meta( $post->ID, 'custom_excerpt_length', true ) ) { $len = $custom; } return $len; } ?>
Now that we have the excerpt_length
sorted out lets tackle excerpt_more
. As we all know the default more text looks like this [...]
. Changing that value is rather simple just like the first example for excerpt length.
<?php add_filter( 'excerpt_more', 'my_excerpt_more' ); function my_excerpt_more( $more ) { $more = '...'; return $more; } ?>
Now that looks a little better. I never really liked the square brackets in there, but lets take it one step further. Why not make the more text actually link to the post.
<?php add_filter( 'excerpt_more', 'my_excerpt_more' ); function my_excerpt_more( $more ) { global $post; $link = get_permalink( $post->ID ); $more = "<a href='$link' class='excerpt-more'>More ></a>"; return $more; } ?>
There, that's much better, now we have an element that we can style and conveys the message that there is more to this story and you can see it by clicking here.
3. Don't Forget the Analytics
Analytics are a large part of running a successful website. It doesn't matter if it's a small "mom and pop" site or a fortune 500 company site. There is always a way to benefit from tracking the usage patterns of your site.
There are a lot of options when it comes to Google Analytics plugins, some are better than others and everyone has an opinion on what is the best. I'm not going to tell you that the two plugins I'm going to talk about the absolute best, but they are the ones that I have found to offer the options that I want.
-
Google Analytics for WordPress by Yoast
Yoast takes analytics to the next level by taking advantage of analytics custom variables to track traffic by post type, author, clicks and downloads and a handful of other options. With the amount of data that is collected though this plugin you can map out your traffic patterns till your head spins, and still have data to go through.
-
Google Analytics Dashboard
Where Yoast takes all the information you could want and feeds Google with it. Google Analytics Dashboard takes that information and puts it right at your fingertips. The dashboard widget gives you at-a-glance statistics of the traffic, most popular pages and posts, top searches, and top referrers as well as bounce rate, visits and page views. While the analytics column added to the page / post list gives you the sparklines and data for each post or page.
The use of these two plugins together has allowed me to help my clients really understand how to use analytics and improve their site based on that information.
4. A Little SEO Goes a Long Way
Yes, yes, I know this subject has been done to death, reanimated and put down again. So why am I bringing it up in this article...
That would be because people still fail to really pay attention to what SEO is and what it can do for your site. Of course this isn't an article on how to properly handle SEO in your theme, I'm going to assume you have already done that.
What I am going to do is just share some of my personal choices for SEO plugins when finishing up a new site.
-
All in One SEO Pack
For years I have been using this plugin for the daily SEO needs of client sites. It has always performed admirably and I will continue to use it for years to come.
-
WordPress SEO by Yoast
This plugin has been around for a while now but it was only recently that I used it for the first time. And I fell in love with it. The features are outstanding and the flow of the plugin is perfect. It makes number two on my list because I fear some of my less tech savvy clients clients fill find some of the features overwhelming.
-
W3 Total Cache
I know most of you reading this are probably asking if I have a screw loose. What does page caching have to do with SEO? When you consider that Google uses page speed as a factor in ranking sites it becomes clear that caching can not only be in the performance section of your needs but also a big factor in SEO too.
5. Back It Up
There are some things in the development world that are unavoidable. One of those things is the dreaded "It's all gone!" call/text/email/other form of contact. If you haven't had the luxury of dealing with it yet, just wait, you will.
It will start out with a frantic message from your client saying that something has happened to the site, of course they will have no idea how or what happened. At this point there are two things you can tell your client; either you have a backup you can restore, or you don't.
You really don't want to be the guy that has to tell the client that he is out of luck. Do you?
The great thing about the open source community is when you need a solution for something there are bound to be a good number of options to choose from. If you search the WordPress plugin directory for "backup" you will get close to 500 results. Not all things are created equal and rummaging through 500 plugins can take a really long time. So I'm going to narrow the field a bit and talk about a couple solutions that I've used that work, and work well.
-
BackWPup
This has been my goto plugin for backups for a while. Not only can it backup the database but also the entire file structure. The resulting backup can be stored on the server, sent to your email or more importantly it can be stored using a number of external storage sites like S3, Dropbox or even through the FTP of another server.
-
Online Backup For WordPress
Similar to BackWPup Online Backup for Wordpress will create a backup on your local server that you can download, or it can email it to you. There is also a third option to backup to your own Backup Technology account and store your backups in their secure data center (100 MB free).
-
VaultPress
Unlike the first two solutions VaultPress comes with a monthly fee ranging from $5 to $40 at the time of this article. It is also a complete third-party backup. When your site is backed up the files are stored on the VaultPress servers and can then be restored from there too. This means that if anything ever happens to your server or personal computer the files will still be safe and sound on their servers.
Some other plugins that I've used over the years and deserve an honorable mention in this category are WP-DB-Backup, Complete Central Backup, and Backup.
Conclusion
The five topics covered in this article only scratch the surface of all the nit picking that can be done on a site before you finally launch it. But they do make for a good start to get you to think about what else there might be to do.
It is also important to keep in mind that every client is different and what worked for one will not always work for another. Some people are tech savvy and want lots of features, some are not and want it as automated as possible. So it's best to keep an eye out for new plugins that do the same job in different ways so you always have options.
Comments