WordPress CMS Part 3: Finishing Touches
Hello, everyone! Long time no see. Sorry about the lack of activity on the blog, but I’m working on a couple of client projects and I’m also trying to put myself in action mode and kick start some of my own projects. Not to mention I took a couple of days off and went here. Anyway… don’t want to stray away too much from the topic of this post.
As you know, a while ago I started a three part series on using WordPress as CMS. And not only did I write about the whole process, but I also chose a real website as an example. A couple of days ago I managed to make the final tweaks to Sky Dental, so now I’ll tell you a bit about the final tweaks I had to make.
Making the switch
The initial website was build using static HTML files, so what I did was to move the files to a folder called “_old” and just create an index.html file with the logo and a message saying “We’re updating the website. Sorry for the inconvenience! Please come back in a couple of hours”. That’s right, an under construction page. Some people hate them, some say they’re so ‘90. I see no harm in using one, especially if you can indeed make the switch in a couple of hours.
So I installed the latest version of WordPress, uploaded my theme and imported all the content from the old pages. Basically, I created a couple of static pages, using the same tree structure as the old website.
One thing you should know is that WordPress will not allow you to change the permalink structure when dealing with subpages. To be more specific: if you have a page called Services and a subpage called Web Design and you’re using /%postname%/ as permalink structure, this is the URL you’re stuck with: http://mysite.com/services/web-design. Of course you can change the current page slug (web-design in this case), but not delete the parent page slug.
I’m telling you this because before, when I was using HTML files, my URL’s were something like this: http://mysite.com/page-name. I searched all over the forums, blog, etc. but couldn’t find a solution. So if you know something I don’t, just leave a comment.
It’s not such a big deal, especially since I noticed something interesting: if you use the old URL (http://mysite.com/web-design), WordPress will know what page you’re looking for and redirect you to http://mysite.com/services/web-design. Even so, I used a couple of 301 Redirects, juts to be sure.
Using 301 redirects and SEO rankings
Permanent redirects or 301 redirects are a must when updating an old website. If you want to keep search engine rankings for some (or all) of your old pages, you need to show Google where your new content is.
I will not go into too many details here, especially because I’m not an SEO guru or anything. I know a thing or two about SEO best practices, but that’s it. If you want to read more about 301 redirects, check this post from Steven Hargrove. It’s an oldie but goldie, very concise.
I added 13 redirects (hmm…) to my .htaccess file. Here’s one of them:
Redirect 301 /program-cabinet/ http://www.skydental.ro/contact/program-cabinet/
Don’t forget to add an XML sitemap to your site. I used a very popular plugin called Google (XML) Sitemaps Generator for WordPress. Then you can create an account at Google Webmaster Tools and submit your XML sitemap. Google has a bunch of other interesting tools for webmasters as well.
Sky Dental ranks pretty good for “dental practice” (in Romanian of course). It’s on page 1 or 2 (don’t know why keep changing that often) for this competitive keyword. I’ll let you know how it goes after this WordPress migration.
Using Page Templates in WordPress
Most of the website pages use the theme’s built in page.php file. But I also created a bunch of Page Templates for Sky Dental, because some pages had different kinds of content and I didn’t want (couldn’t) add that content in the WordPress editor. So next I will go through the process of creating and using Page Templates in WordPress
Let’s take for example this page. That pages uses some JavaScript to display a Yahoo map, so the easiest way to do this without any hacks or plugins is to create a Page Template. Here’s how:
1. Duplicate page.php (you can also start from scratch, but this way is easier and you also keep tha same structure) and name the file map.php
2. Add the following lines above the existing code:
<?php
/*
Template Name: Map Page
*/
?>
3. Update the file with the appropriate content / code. In this case, I added the JavaScript code just below the actual content.
4. In WordPress admin, go to Manage > Pages and open the page for which you want to use the template. Below the editor there should be a panel called Page Template. Choose your newly created template from that list.
5. Hit Save and refresh the page in your browser.
Conclusions
I initially wanted to write a short recap of things you need to remember when using WordPress as CMS, but then it hit me: the tips I gathered were so great, that it would be a shame to have them tucked away at the end of this post. Not to mention this post is pretty long already.
So I’ll keep you guys waiting for a little bit more (muhahaha!!!) and I will publish these tips as a separate post. Trust me, it will be worth the wait! I worked on quite a few “WordPress for website” projects recently, so I’ll put all my knowledge into those tips and they will be perfect to bookmark for later. So… you know what to do, right? Subscribe to RSS.




