WordPress for business or an alternative?

Started for blogging, wordpress has grown into a wonderful content management system that is search engine friendly and in the main, free.

As an open source cms, it has led to some of the worlds top designers and developers to contribute to its functionality. Developers have created WordPress plugins that have added everything from ecommerce capabilities to stringent security. Designers have created themes that cater to photographers right through to designs for law firms.

But what about the competition?

Joomla

Another open source application, Joomla offers a middle ground between Drupal and WordPress and the ability to structure more complex and flexible sites than wordpress. A strong user community help this great cms. Supports ecommerce and social networking sites.

Drupal

Known for its strong taxonomy and ability to create complex content, Drupal is another open source cms. Requiring the most technical expertsie of the three, it is also capable of creating the most advanced sites. A great developer lead community, Drupal is well suited for complex data sites like multiple user community sites.

 

In conclusion, WordPress is a great cms for most businesses, but for more complex data driven sites, then it is worth looking into Drupal and Joomla, both offering fantastic robust platforms.

Designing a Basic WordPress Theme

If you ever wondered how WordPress themes are put together, this tutorial will run through the very basics of a theme and hopefully wet your appetite in creating your own theme.

Before you start, think about the layout of your new theme, draw it out on a piece of paper if it helps.
For the purpose of this tutorial we are going to split our layout into a very simple grid consisting of a header, main content area, right hand side bar and a footer.

layout

 

 

 

 

 

 

 

1- Using an FTP client or file manager tool, create a sub-folder in the wp-content/themes directory in your WordPress folder and give it a theme name ie “my_theme”.

2- Use a simple text editor like notepad to create the files that relate to the layout for “my_theme”.

We are going to write 5 files to create our layout before uploading our files via FTP to our newly created “my_theme” folder –

header.php (Header area code)
index.php (This is our main area code and will specify where the other files will be allocated)
sidebar.php (Sidebar information)
footer.php (Footer area code)
style.css (This will dictate how our site will look, for example- colours, fonts, spacing etc.)

Here are the files for our layout-

header.php file

<html>
<head>
<title>my theme</title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
</head>
<body>
<div id="wrapper">
<div id="header">
<h1>HEADER</h1>
</div>

 

index.php file

<?php get_header(); ?>
<div id="main">
<div id="content">
<h1>Main Area</h1>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<h4>Posted on <?php the_time('F jS, Y') ?></h4>
<p><?php the_content(__('(more...)')); ?></p>
<hr> <?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
</div>
<?php get_sidebar(); ?>
</div>
<div id="delimiter">
</div>
<?php get_footer(); ?>

 

sidebar.php

<div id="sidebar">
<h2 ><?php _e('Categories'); ?></h2>
<ul >
<?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
</ul>
<h2 ><?php _e('Archives'); ?></h2>
<ul >
<?php wp_get_archives('type=monthly'); ?>
</ul>
</div>

 

footer.php

div id="footer">
<h1>FOOTER</h1>
</div>
</div>
</body>
</html>

 

style.css

body { text-align: center; }
#wrapper { display: block; border: 1px #a3a3a3 solid; width:90%; margin:0px auto; }
#header { border: 1px #a3a3a3 solid; }
#content { width: 70%; border: 1px #a3a3a3 solid; float: left; }
#sidebar { width: 27%; border: 1px #a3a3a3 solid; float: right; }
#delimiter { clear: both; }
#footer { border: 1px #a3a3a3 solid; }
.title { font-size: 12pt; font-family: verdana; font-weight: bold; }

 

These files will give us the basic layout we need. We can tweak the various css rulings to our own liking and upload posts and images to our new blog theme.