Cool Blue is a theme that was created with Artisteer. Artisteer is a great program for quickly creating a basic WordPress theme structure. It just has a few areas that need some adjustments. I’ve tried to address a couple of those areas with this theme. There’s nothing wrong with the basic generated theme, it’s just that some of the functions are boilerplate and it’s difficult to figure out how the magicians at Artisteer did things. I’m sure that as time goes by Artisteer will incorporate more and more of these type of features.
Artisteer saves untold hours in design that can be better spent on enhancing and adding your own special touch to your new blog site.
Cool Blue was created as a tutorial theme for other Artisteer users to learn how they can modify the basic exported Artisteer theme. This way you can customize your site so that it doesn’t look like so many other out of the box Artisteer sites.
The basic Artisteer theme names the widget areas as Sidebar1, Sidebar2 and so on. Widgets can be used anywhere so I found a way to change the functions.php file to rename the widget areas to something more meaningful. After all, if you’re going to put a widget in the footer it shouldn’t be called Sidebar3.
Cool Blue includes these defined widgets:
You can rename these or even add more if you’d like. If you want to edit the widget names or add some more widget areas, find the following lines in the functions.php file…
if ( function_exists('register_sidebar') ) register_sidebar(array('name'=>'widget_area_1', 'before_widget' => '<!--- BEGIN Widget --->', 'before_title' => '<!--- BEGIN WidgetTitle --->', 'after_title' => '<!--- END WidgetTitle --->', 'after_widget' => '<!--- END Widget --->' ));
If you want to change the name, just overwrite the existing name with a new one. If you want to add more widget areas then just copy the above code and add it after the last sidebar declaration and give it a descriptive name.
Couldn’t be easier. All you have to do to incorporate the new widget names in your own theme is to copy the Cool Blue widget functions and overwrite the Artisteer widget functions. See the comment in the function.php file.
To add a custom widget area to the theme, copy the following code and put it where you would like it to appear.
<div class="widgetcontent" ><!-- Give it some style --> <?php if (!art_sidebar(widget_area_1)): ?><?php endif ?> </div>
Now just put some Amazon or Google Adsense code in a text widget and you’re ready to roll. The Cool Blue theme comes with extra widget areas above and below the main content area in the index.php page.
Secondary Navigation for Categories
Cool Blue adds a secondary navigation area just under the main nav bar. It will display category titles for all categories that have posts assigned to them. If you look in the header.php and extras.css you can see how this nav bar was implemented. It is very easy to incorporate into your own theme and you can style it any way you choose..
Custom Image Header Function
This was the most challenging feature to incorporate. The reason being is that there isn’t much info on this function. It’s a special API that’s actually built into WordPress. It has some limitations but for some themes it’s a perfect enhancement.
This modification adds a new selection to your Appearance menu allowing you to add a new header image to your theme without any coding. All of the heavy lifting is done by WordPress. You can upload a large image and the program will allow you to crop and resize it to get just the header appearance. You can even change the color of your header text. And if all else fails it will allow you to revert back to your original header image.
If you choose to put this function into your own them, keep in mind that the header image needs to be rectangular. No rounded corners as Artiteer adds a transparent overlay to create the rounded courners and this will be lost with this function.
If you want to see how this was done, look at the end of the functions.php file for the admin code. Look in the header.php file for the changes to the header. Cut and paste the code into your own theme. The code has some comments in it for modifying the header size and you may have to play with the CSS styling to get things perfect.
Note: I removed the footer link editor from my functions.php file because there was a conflict with the custom image header function.I’ll put it back and update the theme when I get time to re-incorporate it.
Misc Theme Info
Image Thumbnails In Post Excepts:
Posts that appear on the front page can have a thumbnail image attached to them. When you create a new post (or edit an existing one) just add a custom field called “thumb” and give the URL of the image. The image will be scaled down to 100×100 pixels, so it would look best to have a square image to start with. If you don’t want a thumbnail, don’t include a custom field.
Custom Field Input
The only required plugin is limit_posts. This plugin does exactly what it’s name implies, it limits the length of a post to a predetermined number of characters.
You can use any other plugins that you find useful.
One thing to remember is to turn off all of your widgets you have enabled. Since this theme has different widget names, WordPress won’t know what to do with the widgets you have already assigned.
I make no promises as to the functionality of these modifications to your theme code. Do it at your own risk. Do it on a backup copy. Do it while wide awake and after having plenty of sleep or plenty to drink, your choice. Don’t do it to your original code. Don’t do it while sleepy, cranking, or driving. And most important, don’t expect it to work the first time. If it does work the first time you probably got lucky. Besides, if you don’t break things you never figure out how they work. And last but not least…Have fun and learn something new.
|Updated:||June 7, 2009|
Copyright & License
Cool Blue is licensed under the GNU General Public License, version 2 (GPL).
2009 © Bud Griffin