Erik’s Blog: Board Shorts and Business Suits

Building Bussiness Systems from the Shores of Waikiki

Entries Comments



Blog Added to Existing Static AlohaUpdate.com

22 January, 2006 (21:10) | HTML Tips, Wordpress Tips | By: Erik

Thanks to two helpful sites (one at moshu the wordpress moderator’s site and the other at Jonathan Wold’s great site) as well as a lot of trial and error, I was able to add a WordPress Blog to my existing site. The other site AlohaUpdate.com used to be a very cumbersome static html only site that was created using a Dreamweaver template that I hacked up into my own. Now it has all the functionality of a blog with the same static pages it did before.

I added the blog in order to have a daily update as to all the crazy adventures my girlfriend and I have around the islands. This way I can easily build content within the site and attract more search results without having to labor through all of the static html programming. I am still going to keep updating all the static pages but at a more gradual pace. Plus a blog allows visitors to believe that you are updating the site regularly rather than once and leave it. The islands are always changing and adding new adventures for us so we thought it only right to show our visitors this.

There are basically two ways to add a blog to an existing site. One way is to place a simple php loop within the area that you want your blog text to appear. The other is to design a theme around your existing html site using CSS (cascading style sheets) and update your links accordingly. I chose to do the second option because the first has a few drawbacks for someone looking for a quick solution. The loop only allows the page to retrieve the post from the WordPress file. WordPress has no control over the setup of the links within the site and therefore makes the post title link, comments link, categories link, and paged navigation link useless. I would imaging on would have to develop quite a few php files to create the illusion that the links discussed above came from the WordPress engine.

The second option on the other hand allows the blog page (in my case the index page) to be its own control of the blog, and as long as the links out of the blog direct themselves to the proper folders and files there will be no problems with all those mentioned links. For example, on AlohaUpdate.com there are links at the top of the page to navigate to our pages on the different islands. At first when I created the index.php file within my new theme folder I kept the links the same thinking the index.php rerouted to the index.php within the main blog folder. (I am using an “Out of the Box” WordPress setup so I assume as long as you didn’t change anything these files and folders will make sense) This is not the case. the index.php file you can access from the WordPress administration site is within the wp-content/themes/ folder structure so the static links that worked before won’t work unless you paste all your linked files to the themes folder, messy. Instead what you can do is direct each of these links on the main them template (index.php) to the URL of your blog (http://www.yoursite.com/folder/file/etc/etc) and this will give you the same functionality as if you were starting from the main folder.

Another thing I noticed from this that was a little odd was when I used copy and paste within my host (netfirms) it changed all the pictures to .JPG rather than keeping them what I had as .jpg. This does make a difference. So, if you use your hosting company’s file manager to copy and paste files, check to make sure it didn’t decide to redo your file extensions, especially if your pictures don’t work afterwards.

I would write more about how to integrate and add a WordPress blog to your existing site but I think Moshu and Jonathan do a pretty darn good job of it. If there are any questions or concerns I would be glad to make another post about this but will save my time for cleaning up Aloha Update. I have some links that seem to not be working and I need to redirect some of those includes.

Write a comment