Tag-Archive for » WordPress «

Customize your WordPress Backend for Personal Branding

With more and more people building custom WordPress themes, it only makes sense to want to create it more personal. I have found a few ways that I will share with you on making your WordPress powered site more personal. This tutorial will show you how to create a custom WordPress login, and explain how to fit it to your needs.

We will then take it a step further and create a custom admin panel footer, and also a custom admin header image for our WordPress site.

Let’s Get Started

Setting it Up

For this example we are going to modify our functions.php file. If your theme does not have this file you can create a blank file and name it functions.php – Make sure this file is placed in the theme directory of the current activated theme you are using.

Add the following to your functions.php file:

functions.php


php
function custom_login() {
echo 'wplogin/wplogin.css" />';
}
add_action('login_head', 'custom_login');
?>

Explanation of the Code

We are using the functions.php file to tell WordPress to override the default settings for the .css file used to make up the login screen. By doing this we are directing WordPress to use a specified .css file that we are going to create for our custom login screen. This .css file will be what we modify to design the login page.

Please make note that there are some very specific styles within the .css file that MUST be present, and changed accordingly for this to properly work. I have created the folder and placed the .css file in it to keep it separated from our regular theme files. If you want to the path can be altered as long as it points to the direct location of the CSS file within your theme.

The Setup

Next we will need to do two things. First, we will need to create a new folder in our theme directory. For this example we are going to use the folder name wplogin.

This folder will be placed within our WordPress theme file folder.

In this folder we will make a new blank file and name it wplogin.css

Taking a look at the setup

This is now what you should have. Remember that the location can be changed using the code we placed in our functions.php file – but for this example you should now have the following:

The file structure will be: wp-contentthemesYOUR_THEME_NAMEwplogin

The new folder we named wplogin will go into your theme folder, and the new .css file we created will be held within the new folder.

Now let’s view what we will be adding to our .css file:

wplogin.css


/* Page Background */
html {
	background: #eae2d5 url(bgimage-path);
	margin: auto;
	font-weight:bold;
}
/* WordPress Logo - MAKE SURE TO MATCH THE WIDTH AND HEIGHT */
h1 a {
	background:url(logo-path) 0 0 no-repeat;
	width:290px;
	height:150px;
	margin-left: 10px;
	margin-bottom: 0px;
	padding-bottom: 0px;
}
/* Top Bar Background Color */
body.login {
	border-top-color:#dac6ad;
}
.message {
	margin-bottom: 0px;
}
/* Login Button */
#wp-submit {
	background: #bc3d1d;
	border: #f24643;
}
/* Lost Password Link */
.login #nav a, .login #nav a:hover {
	color: #443030!important;;
}
/* Top Bar Link */
.login p#backtoblog a:link, .login p#backtoblog a:visited {
	color:#443030;
	font-weight: bold;
}
.login p#backtoblog a:hover, .login p#backtoblog a:active {
	color:#443030;
	text-decoration:underline;
}

Explanation of the .css

Now that we have both the functions.php code in place telling WordPress to use our custom .css file, and our .css file in place, we can start to modify it a bit. The comments within the .css example should explain most everything but we will break it down to further understand it.

Make a note that when changing the logo image you MUST match it with the width and height in the CSS file. That is noted up above in the comments within the CSS file but it is VERY important or it will not always work correctly.

Full Breakdown

I know the .css is commented well but I still want to cover each editable item. Let’s see below to take a look at it:

The Page Background will be the entire page background color and image. The example .css file above shoes a link to the image but there is not one set. You can modify this to create a full-page background image, or change it to a color of your choice.

The WordPress Logo: This is where you will need to be sure to change the width and height to match your image. As long as the dimensions fit your logo you are using it will work correctly.

Top Bar Background Color: This is the bar located at the very top of the page. This can be changed to any color you like.

Message: This is the bottom bar that can be changed to any color you wish as well.

Login Button: This is the submit button on your login page.

Lost Password Link: This is the a:link button to retrieve your password if lost.

Top Bar Link: This is the a:link’s at the very top of the page within the Top Bar area.

Login: This is the writing on the login form of your page.

Take a look at the image below for a diagram of items within the CSS file we can change:

Taking it a step further

Now to continue making our WordPress install more custom and personal, we will change the footer link on our admin screen. This can personalize our website just a little bit more.

Again using the functions.php file we can force WordPress to change something. We will be telling WordPress what we want in our footer area of our admin screen instead of the generic text that comes standard with a regular install of WordPress.

Here is the code we will be adding, but this can be modified to your needs:


function remove_footer_admin () {
echo 'Anything you want can go right here | Copyright © 2010 My Website name';
}
add_filter('admin_footer_text', 'remove_footer_admin');

Changing the Admin Logo

This can also be really useful when trying to personalize your WordPress powered site. Even if you are creating the site for a client they will always enjoy seeing their logo on the admin screen. This is easy to do, and can be done by editing the functions.php file. Add the following code and be sure it points to your image that you will be using:


// Custom Admin Top Logo
add_action('admin_head', 'my_custom_logo');

function my_custom_logo() {
   echo '<style type="text/css">
         #header-logo { background-image: url('.get_bloginfo('template_directory').'/images/custom_logo.gif) !important; }';
}

What we have now

Now we have created a custom WordPress login screen, as well as a custom footer within our admin screen, and a custom image in the header of our admin screen. This should be a good start in personalizing our WordPress powered site. There are still things that can be done to take all of this even further. Using these methods is good for personal sites, multi-user sites, and even sites created for clients that want to see their WordPress site personalized. Playing with the above provided code will allow you many options to customize your WordPress site.

How To Create An Options Page For Your WordPress Theme

WordPress is one of the most popular Content Management Systems. Also WordPress isa CMS of choice for many web developers Its relatively easy to use, but can be made even simpler when you include an administration panel for users when making themes. Additionally, themes buyers find the options panel too easy to use rather than having to open up the PHP template files and fiddling with the code.

Today we will be incorporating an options panel for the WordPress Classic theme. The methods you will learn will allow you to very easily integrate it into an existing theme youre working on.

Setting The Files :

The theme that we will be working on is the classic theme provided by wordpress. You can find it on wp-content/themes folder. You should see the following files:

  • index.php
  • functions.php
  • comments.php
  • footer.php
  • header.php
  • rtl.php
  • sidebar.php
  • style.css
  • screenshot.png
  • An images folder with two files

Most of our work will be done within the functions.php file.

Now go to your wordpress admin panel then go to Appearance>Themesand activate the classic theme.

Working on functions.php :

Begin by opening up functions.php in your code editor of the classic theme (wp-content/themes/classic/functions.php) then insert the following code :

<?php
$themename="Classic Theme";
$shortname="ct";

I added two variables the first one reffers to the name of the theme and the second is the shortname : You can choose any name for these two variables but don’t forget to select significant names because you will be using them later.

Now let’s start adding some options for our theme :

$options = array (
 array( "name" => $themename." Options",
       "type" => "title"),
   array( "type" => "open"),
 array( "name" => "Color Scheme",
           "desc" => "Select the color scheme for the theme",
       "id" => $shortname."_color_scheme",
           "type" => "select",
       "options" => array("blue", "red", "green"),
       "std" => "blue"),
 array( "name" => "Logo URL",
       "desc" => "Enter the link to your logo image",
       "id" => $shortname."_logo",
       "type" => "text",
       "std" => ""),
 array( "name" => "Homepage header image",
       "desc" => "Enter the link to an image used for the homepage header.",
       "id" => $shortname."_header_img",
       "type" => "text",
       "std" => ""),
 array( "name" => "Footer copyright text",
       "desc" => "Enter text used in the right side of the footer. It can be HTML",
       "id" => $shortname."_footer_text",
       "type" => "text",
       "std" => ""),
 array( "name" => "Google Analytics Code",
       "desc" => "Paste your Google Analytics or other tracking code in this box.",
       "id" => $shortname."_ga_code",
       "type" => "textarea",
       "std" => ""),
    array( "name" => "Feedburner URL",
       "desc" => "Paste your Feedburner URL here to let readers see it in your website",
       "id" => $shortname."_feedburner",
       "type" => "text",
       "std" => get_bloginfo('rss2_url')),
    array( "type" => "close"));

Here the variable “option” contains a big array which also contains other child arrays. Each child array holds an option.

The first array reffers to the title of the page ( In our case it’s ‘Classic Theme Options’ ). Every time when we want to add a new option we have to declare an array with a type and give it the name we want.

You can take a look at the options specified below :

  • name: The name of the input field.
  • desc: A short description explaining what it is to the user.
  • id: the id of the field, prefixed by the shortname. It will be used to store as well as access the options.
  • type: the input type select, text or textarea
  • options: used to declare an array of options for a select type input.
  • std: the default input value, used if no other input is given.

Now we have our options ready but how can we view them ? Add the following pieces of code to the functions.php file:

function mytheme_add_admin() {
global $themename, $shortname, $options;
if ( $_GET['page'] == basename(__FILE__) ) {
if ( 'save' == $_REQUEST['action'] ) {
foreach ($options as $value) {
update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
foreach ($options as $value) {
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }
header("Location: themes.php?page=functions.php&saved=true");
die;
} else if( 'reset' == $_REQUEST['action'] ) {
foreach ($options as $value) {
delete_option( $value['id'] ); }
header("Location: themes.php?page=functions.php&reset=true");
die;
}
}
add_menu_page($themename." Options", "".$themename." Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');
}

Here I declared a function with a name of “mytheme_add_admin”. This function is used for updating options : If the options are saved, then all the options are updated with their new values. If the options are being reset (indicated by another hidden variable with a value reset), then all of the options are deleted. The last line adds a theme page( add_theme_page ) in Appearance box and it calls mytheme_admin function. If you want you can replace add_theme_page with add_menu_page to create an external box :

At this step we still don’t have the theme options page, so we have to write mytheme_admin function which was called by add_theme_page, add this code to functions.php :

function mytheme_admin() {
global $themename, $shortname, $options;
if ( $_REQUEST['saved'] ) echo '<div id="message"><p><strong>'.$themename.' settings saved.</strong></p></div>';
if ( $_REQUEST['reset'] ) echo '<div id="message"><p><strong>'.$themename.' settings reset.</strong></p></div>';
?>

Here we have some conditions : if the settings are saved WordPress will show ” Classic theme settings saved “. Likewise for reset.

Now paste the code above I will explain it after :

<div class="wrap">
<h2><?php echo $themename; ?> Settings</h2>

<form method="post">

<?php foreach ($options as $value) {
switch ( $value['type'] ) {

case "open":
?>
<table width="100%" border="0" style="background-color:#cdcdcd; padding:10px;">

<?php break;

case "close":
?>

</table><br />

<?php break;

case "title":
?>
<table width="100%" border="0" style="background-color:#868686; padding:5px 10px;"><tr>
<td colspan="2"><h3 style="font-family:Georgia,'Times New Roman',Times,serif;"><?php echo $value['name']; ?></h3></td>
</tr>

<?php break;

case 'text':
?>

<tr>
<td width="20%" rowspan="2" valign="middle"><strong><?php echo $value['name']; ?></strong></td>
<td width="80%"><input style="width:400px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></td>
</tr>

<tr>
<td><small><?php echo $value['desc']; ?></small></td>
</tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

<?php
break;

case 'textarea':
?>

<tr>
<td width="20%" rowspan="2" valign="middle"><strong><?php echo $value['name']; ?></strong></td>
<td width="80%"><textarea name="<?php echo $value['id']; ?>" style="width:400px; height:200px;" type="<?php echo $value['type']; ?>" cols="" rows=""><?php if ( get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?></textarea></td>

</tr>

<tr>
<td><small><?php echo $value['desc']; ?></small></td>
</tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

<?php
break;

case 'select':
?>
<tr>
<td width="20%" rowspan="2" valign="middle"><strong><?php echo $value['name']; ?></strong></td>
<td width="80%"><select style="width:240px;" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>"><?php foreach ($value['options'] as $option) { ?><option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option><?php } ?></select></td>
</tr>

<tr>
<td><small><?php echo $value['desc']; ?></small></td>
</tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

<?php
break;

case "checkbox":
?>
<tr>
<td width="20%" rowspan="2" valign="middle"><strong><?php echo $value['name']; ?></strong></td>
<td width="80%"><?php if(get_option($value['id'])){ $checked = "checked="checked""; }else{ $checked = "";} ?>
<input type="checkbox" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="true" <?php echo $checked; ?> />
</td>
</tr>

<tr>
<td><small><?php echo $value['desc']; ?></small></td>
</tr><tr><td colspan="2" style="margin-bottom:5px;border-bottom:1px dotted #000000;">&nbsp;</td></tr><tr><td colspan="2">&nbsp;</td></tr>

<?php break;

}
}
?>

<p class="submit">
<input name="save" type="submit" value="Save changes" />
<input type="hidden" name="action" value="save" />
</p>
</form>
<form method="post">
<p class="submit">
<input name="reset" type="submit" value="Reset" />
<input type="hidden" name="action" value="reset" />
</p>
</form>
</div>

Explanation :

With this code we created our options page content : I used a php foreach loop, each option type is evaluated on a case-by-case basis. So if the type of the option is title do this, if it is a checkbox do that…

If there is an open type option we do nothing. If there is a close type options, we close our table. For each of the types text , select , checkbox and textarea , we display the corresponding input. At the end we added two buttons one to save the settings and the other to reset them.

Now our options page is ready, but we have to add this short code to make it work :

<?php
}
add_action('admin_menu', 'mytheme_add_admin');
?>

This short code tells WordPress to add the admin menu.

After all this, here the result you should end up with :

In this example I used simple styles included in functions.php to make our options page looks better but I will show you how to add a stylesheet to functions.php so you can add your styles rapidly.

How to add a stylesheet to functions.php :

First, you have to create a new folder on your theme folder, name it functions then create a new css file with a name of functions.css. After flling your css file add this code to functions.php after mytheme_add_admin function :

function mytheme_add_style() {
$file_dir=get_bloginfo('template_directory');
wp_enqueue_style("functions", $file_dir."/functions/functions.css", false, "1.0", "all");
}

That adds the functions.css file to the head. The location of the file is determined by the template directory.

Also, if you want you can use scripts to make your options page better by including a js file.To do this you have to change

wp_enqueue_style("functions", $file_dir."/functions/functions.css", false, "1.0", "all");

To :

wp_enqueue_script("script", $file_dir."/functions/script.js", false, "1.0");

After adding your stylesheet or your script, you have to add this code underadd_action(‘admin_menu’, ‘mytheme_add_admin’); so they will be active :

add_action('admin_init', 'mytheme_add_init');

Making Use of the Options :

Now after creating our options, I will show you how to make use of them.First up, open up your header.php file, and add the following code:

<?php
global $options;
foreach ($options as $value) {
    if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
}
?>

You must put the code above at the start of all the files which you add options to. Once youve done that you can begin using your options. For example : If you want to display the footer text you have to echo $ct_footer_text ( ct reffers to the shortname of the theme ) :

<?php
echo $ct_footer_text;
?>

For a checkbox you can check if the box is checked ( it will return true ) do this…

You can download the functions.php file here.

That’s it ! Thanks for reading this tutorial and I hope it was useful.

The Ultimate Roundup of WordPress Tutorials, Themes and Guides

WordPress is the most popular blog software in use today. Also developers number is growing so every developer is interested with WordPress development to offer better products for his clients. One of the great things about working with WordPress and developing your own themes is the community and all of the resources that are available. If youre not sure how to do something or looking to see what solutions other theme designers and developers are using, you can find plenty of information and tutorials to help.

Today, I prepared a good selection of the best resources to learn this wonderful blog and CMS covering every thing from books, tutorials, tricks and tips … Hope you will enjoy this collection !

WordPress Essentials and Basics:

This section includes some official resources for the WordPress community and some general articles that will help you to get more out of your development for WordPress.

  • Installing WordPress This is an official WordPress.org tutorial showing how to install WordPress. Also if you want to install it locally you can take a look at this Installing WordPress Locally.
  • WordPress Support Forums If you need anything or you have something going wrong with your WordPress blog you can always ask for information.
  • WordPress Docs This WordPress.org section contains everything you need about WordPress to get started.

  • Youve Installed WordPress, So Whats Next? A great overview of steps you should take after youve installed WP.
  • The Ultimate Guide to Setting Up WordPress after an Install A complete guide to what to do once youve installed WP, from Pro Blog Design.
  • 10 Things to Do After Installing WordPress A list of 10 must-do steps to take after installing a fresh copy of WordPress.

WordPress Theme Roundups, Theme Templates, and Theme Frameworks:

Below you will find a wide variety of theme roundups, theme frameworks for building your own themes, and premium theme sites.

Theme Frameworks:

  • WordPress PSD Framework A free PSD template that includes all the common elements in a WP design for you to build on.

  • WordPress Theme Generator An online theme generator that doesnt require any coding knowledge.
  • Easier Theme Development with Sample WordPress Content A downloadable bundle of sample WP content that includes posts, tags, categories, and pages to make theme development easier.
  • Blank WordPress Themes Ready for 2.7 Up for Grabs Offers up a couple of free, empty themes you can download.
  • Blank WordPress Themes A collection of two and three-column blank themes from Refueled.
  • Thematic This is one of the most advanced theme frameworks available.

  • Carrington A free WP CMS theme framework that includes two browser versions and a mobile version.
  • Hybrid Justin Tadlocks framework that features 13 page templates, 15+ plugins supported within the framework, advanced breadcrumbs and much more.

Themes And Templates:

  • 41 Great Looking Free WordPress Themes A roundup of beautiful free themes.
  • 16 Free Premium WordPress Themes That Dont Suck An awesome roundup of free premium-style themes.
  • 140+ Brilliant Free WordPress Themes Around A roundup of some excellent free WP themes.

  • 17 Free and Best WordPress Themes A small roundup of excellent WP themes.
  • 3-Column WordPress Theme Gallery Includes a large number of excellent 3-column themes.
  • 45+ Free Premium WordPress Themes with Magazine or Grid Layouts An excellent roundup of free magazine-style and grid themes.
  • 40 Awesome and Fresh WordPress Themes A good collection of well designed WordPress themes.

  • 90+ Best Free WordPress Themes This collection contains over of 90 great wp themes.
  • 15 Fresh WordPress Themes to Get the Coolest Portfolio for You or Your Studio A collection of portfolio-styled WP themes.
  • 10 Minimalist WordPress Themes Youll Love A collection of ten minimalist themes, some of which arent commonly seen.
  • 25 Simple and Minimal WordPress Themes A great roundup of minimalist themes.
  • 60 Great WordPress Themes An excellent, recent roundup of gorgeous WP themes.
  • 25 Best Free WordPress Themes An absolutely amazing roundup compiled by EliteFreelancing.com of gorgeous WP themes.
  • 14 Most Visually Appealing Free WordPress Themes A small collection of beautiful and elegant themes.
  • Best WordPress Themes Collection A roundup of excellent paid WP themes.
  • 10 Best Free WordPress Themes You Havent Seen A great collection of seldom-seen WP themes.
  • 30 Free Magazine/Grid Style WordPress Themes A compilation of 30 excellent magazine and grid style WP themes.
  • 100 Excellent Free WordPress Themes An excellent roundup of high-quality themes from Smashing Magazine.
  • 83 Beautiful WordPress Themes You (Probably) Havent Seen Yet While this post is a couple of years old and you probably have seen many of the themes on it, its still a great roundup of gorgeous designs.

  • 45+ Must See WordPress Themes A categorized roundup of themes compiled by Noupe.
  • WordPress Rainbow: 35 Colorful Free WordPress Themes A great roundup of bright and colorful free themes.
  • 22 Free and Unique WordPress Themes A recent roundup of themes not seen very often.
  • Great Green WordPress Themes A wonderful collection of WP themes with a green color scheme.
  • 25 Free WordPress Themes (2009 Edition) A roundup of some really beautiful and different themes.
  • 25 Artistic Themes for WordPress A great roundup of artsy WP themes.
  • 15 Portfolio Themes for WordPress A great roundup of themes perfect for portfolio sites.
  • 65+ Free Exceptional WordPress Themes Worth Investigating A great roundup of gorgeous themes compiled by Tripwire Magazine.
  • 50 Beautiful Free WordPress Themes A roundup of stunning WP themes.

Now Let’s move to the best sites where you can find premium and free WordPress designs and templates:

  • WordPress.org The official theme repository from WordPress, with nearly 1,000 free themes available.
  • Top WP Themes A directory of free themes, many with a corporate or professional look.
  • Themes2WP.com A categorized directory with more than a thousand themes.
  • Elegant Themes Another great premium themes site that allows unlimited access for less than $20.
  • WooThemes Offers paid themes in a club format, though you can also purchase individual themes.
  • Obox Theme Shop A premium theme site with some really awesome themes available with single-site licenses or developer licenses.
  • StudioPress Premium WP theme site that lets you download themes individually or as a package.
  • NattyWP Another club-based premium themes site.
  • ThemeForest One of the best sites where you can buy premium WordPress themes.

Theme Development Tutorials:

The tutorials listed here will walk you step-by-step through the process of creating a WordPress theme.

  • Designing for WordPress: Complete Series &Downloads This is a series of video screencasts by Chris Coyier. It is a three-part series which covers downloading and installing WordPress on a server all the way to a completed theme.

  • So You Want to Create WordPress Themes, Huh? This tutorial is from wpdesigner.com showing how to create WordPress themes.
  • Creating a WordPress Template Heres a tutorial series for creating a WP template.
  • How to Create a WordPress Theme from Scratch Part 1, Part2 This is a step by step tutorial from nettuts.
  • How to Create WordPress Themes from Scratch: Part 1, 2, 3a, and 3b This is another step by step tutorial from themetation.com.
  • How to Create a WordPress Theme in 5 Minutes This tutorial shows how to create a WordPress theme in few minutes.
  • How To Create a WordPress Theme: The Ultimate WordPress Theme Tutorial This tut demonstrates how to build a powerful, up-to-date, WordPress Theme from scratch.

  • Developing a WordPress Theme.
  • Dissection of a WordPress Theme Part 1,Part 2 ,Part 3 ,Part 4.
  • How to Create a WordPress Template or Theme.
  • How to Write Your Own WordPress Theme A complete tutorial for WP theme development.

Tutorials and Tips :

There are far too many tutorials and hacks for theme designers and developers to list here, and a number of excellent collections have already been put together by other bloggers. Above you will find some of the best tutorials and other collections.

Tutorials :

  • Create An Awesome WordPress Theme Options Page (Part 1) A tutorial for creating a theme options panel in the backend of WP.
  • WordPress Loop: Get Posts Published Between Two Particular Dates A great guide to retrieving and displaying posts published during a specific time frame.
  • How to Edit WordPress Themes Using Dreamweaver A great guide to theme editing with Dreamweaver.

  • Leopard: How to Install WordPress A tutorial for creating a local installation of WP on Mac OS X Leopard.
  • Premium WordPress Theme Design Part 1The Photoshop Mock Up The first in a series of tutorials for creating a premium-style WP theme.
  • The Power of WordPress Custom Fields A great overview for working with custom fields.
  • Customize Your WordPress Login Learn how to customize the look of your WP login screen.
  • Things You Should Know When Using Post Excerpt An overview of things to keep in mind when using the post excerpt function in WP.
  • WordPress Custom Fields; Laying Text Over Your Lead Graphic A tutorial that shows you how to add a text overlay to your graphics.
  • 5 Useful WordPress Functions You Didnt Know Existed A rundown of five great WP functions most people have never heard of.
  • Power Tips for WordPress Template Developers An excellent resource from Smashing Magazine of advanced techniques useful to template and theme developers.
  • How to: Make a Control Panel for Your WordPress Theme A tutorial for creating a customization menu in the backend. for your WP theme.
  • WordPress Ajax Commenting Revisited A tutorial for creating your own ajax comment system.
  • WordPress Screencast TutorialPhoto Captions A video tutorial for adding captions to your photos.
  • How To: Adding an Author Page to Your WordPress Blog A fantastic tutorial for creating an about the author page on your blog.
  • Turning a Web Template into a WordPress Theme: A Video Tutorial A video tutorial for turning virtually any website template into a WP theme.
  • Styling Your WordPress Comments Learn to style your comments to better complement your sites design.
  • Displaying Author Meta Information in WordPress 2.8 An excellent tutorial for displaying the meta information included about authors within the front-end of your WP site.
  • Tutorial: Creating Custom Write Panels in WordPress A tutorial for adding unique data to your posts using custom write fields in the backend.
  • Display Thumbnails for Related Posts in WordPress A tutorial for displaying the WP-generated thumbnail images for your posts in a related posts list.
  • How to Set Up Pretty Permalinks in WordPress A guide to creating pretty permalinks from ThemeLab.
  • Multiple WordPress Page Layouts in One Single Template A tutorial that shows you how to create more than one page layout without having to resort to separate templates.
  • Build a Newspaper Theme with WP_Query and the 960 CSS Framework A complete tutorial for building a news-style theme.
  • HOW TO: Create a jQuery Carousel with WordPress Posts An excellent tutorial for creating a carousel to display WP posts from a specific category.
  • Customize WordPress Theme to Match an Existing Website: A Step-by-Step Blog Integration Tutorial Create a WP theme that matches an existing website design for seamless integration.
  • How to Only Show Posts With a Specific Custom Field A quick tutorial for showing posts with content in a specific custom field.
  • Create a Plugin With Its Own Custom Database Table A tutorial for coding plugins that need to have their own custom db table.
  • How to Add Sidebars to a Theme A very basic tutorial for theme developers.

Collections :

  • Top 50 WordPress Tutorials
  • 135+ Ultimate Round Up of WordPress Tutorials
  • 60+ Awesome WordPress Tutorials
  • 10 Useful WordPress Hook Hacks
  • 9 WordPress Hacks to Encourage User Interactivity
  • 10 Handy WordPress Comments Hacks
  • 10 Useful WordPress Loop Hacks
  • Custom Field Hacks for WordPress
  • 8 Useful WordPress SQL Hacks
  • 20+ Tutorials and Resources for Working with Custom Fields in WordPress
  • 30 Tutorials Combining Both WordPress and jQuery
  • 40+ Awesome Tutorials and Techniques for WordPress Theme Developers
  • 30 Excellent WordPress Video Tutorials
  • 110+ Massive WordPress Video Tutorial Collection
  • 23+ Excellent Tutorials for WordPress Theme Developers
  • 63 Essential WordPress Hacks, Tutorials, Help Files and Cheats
  • Top 10 Tutorials for Developing WordPress Themes
  • 100+ WordPress Video Tutorials, from Basic to Advance
  • 26 Complete WordPress Blog Design Tutorials
  • The Ultimate Guide To WordPress Hacks And Customizations

WordPress Plugins :

  • WordPress Plugins and Tutorials A great roundup of categorized plugins, with a few articles and tutorials included at the end.
  • Top 10 Characteristics of a Great WordPress Plugin An excellent guide that should be referred to by anyone developing, or even just using, WP plugins.
  • 12 WordPress Plugins for Theme Development A great list of plugins essential for theme developers.
  • Top 35 Plugins of WordPress to Share Your Blog Post A great roundup of plugins that make it easier for your visitors to share your blogs content.
  • 13 of the Best WordPress Plugins A list compiled by David Airey of the best WP plugins, including All in One SEO Pack and cforms II.
  • 6 Best Facebook WordPress Plugins A collection of six plugins for integrating your WordPress blog and your Facebook profile or page.
  • 20 of the Best SEO Plugins for WordPress A collection of great plugins to improve your SEO, compiled by Mashable.
  • 30+ Must Have WordPress Plugins Another roundup of essential WP plugins.
  • 10 WordPress Plugins Guaranteed to Save You Time This is a great collection of plugins compiled by Six Revisions to make you a more efficient blogger.

  • 70 Best WordPress Plugins to Supercharge Your Blog A comprehensive list of awesome plugins, including Broken Link Checker and Comment Timeout.
  • The Best WordPress Plugins A short review of some of the best WP plugins out there.
  • 30+ Plugins for WordPress Comments A great roundup of comments-related plugins compiled by Mashable.
  • 10 of the Best WordPress Contact Form Plugins to Choose From A roundup of some of the best contact plugins available.
  • Top 30 WordPress Plugins That Are Actually Useful! An awesome roundup from Speckyboy Design Magazine of incredibly useful plugins, including FireStats and WASABI Related Post.
  • 20 New, Useful and Promising WordPress Plugins A roundup of twenty great WP plugins.

Tricks and Hacks :

  • 9 WordPress Hacks to Encourage User Interactivity A great collection of hacks for getting your visitors to interact more, including showing the most recent comments and reversing the order of your comments so the newest ones show up first.
  • 9 Useful Snippets for Your WordPress Functions A collection of handy snippets you can add to your functions.php file to add functionality to your blog.
  • 5 Great WordPress Hacks A small roundup of hacks, including sending pages to Twitter and listing all of the authors on your blog.
  • 13 Vital Tips and Hacks to Protect Your WordPress Admin Area A compilation of security hacks for WP admin.
  • 10 Tips to Improve Your WordPress Theme A great rundown of theme customizations that make your site more user-friendly.
  • 10 Most Wanted Category Hacks and Plugins for WordPress A great rundown of category hacks, including displaying the most recent posts within a specific category and excluding certain categories from being displayed in a loop.
  • 10 Awesome .htaccess Hacks for WordPress A great collection of .htaccess hacks, including removing/category/ from your WP URLs and how to redirect visitors to a maintenance page.
  • 10 Killer WordPress Hacks A roundup of great hacks from Smashing Magazine, including displaying AdSense ads only to search engine visitors and replacing the next and previous page links with pagination.

  • 30+ New Useful WordPress Tricks & Hacks This post from Hong Kiat shows more than thirty new hacks and tricks to customize your WP installation.
  • 40+ Most Wanted WordPress Tricks and Hacks A roundup of great hacks compiled by Hong Kiat.
  • 30+ (More) Most Wanted WordPress Tips, Tricks and Hacks Another roundup from Hong Kiat of great WP customizations.

WordPress Books :

There is a good number of WordPress books but I recommend the books above :

Digging Into WordPress
A book by Chris Coyier and Jeff Starr. Digging into WordPress is the best book I have seen for WordPress designers and developers. I have the PDF version, but a print version is now available as well.

How to Be a Rockstar WordPress Designer
A great book from Envato written by Collis Taeed and Harley Alexander.

WordPress Cheat Sheets :

  • 50+ Cheat Sheets for Building WordPress Themes and Plugins A huge roundup of cheat sheets and references for theme and plugin developers.
  • 13 Helpful Cheat Sheets for Building WordPress Themes A great roundup of cheat sheets helpful to WP theme designers.
  • 63 Essential WordPress Hacks, Tutorials, Help Files and Cheats A great roundup of WP resources.
  • The Advanced WordPress Help Sheet A PDF WP cheat sheet.

How to Create Your first WordPress Theme: Part 1

WordPress is the most popular and the best (in my opinion) blogging platform, created by Automattic. It’s really easy to use and it’s very powerful, giving you the opportunity to build any kind of site, from blogs to shopping carts and CMS’s. In this series of tutorials, we are going to create our first WordPress theme. For this tutorial you need to have a little more than basic knowledge about HTML and CSS. Let’s get started.You can Download source files and you can also Live preview the theme here. It’s a basic css layout so it will be easy for beginners to convert it into a working WordPress theme.

What we need

WAMP/XAMPP Server (orsimilar software)- Download

WordPress 2.9.2 (latest version, recommended) – Download

Getting started – creating the working environment

First thing first, you need to install WAMP Server. After installing WAMP, download and copy the WordPress files in the www directory from your WAMP folder. Start WAMP Server, click on the icon in the task bar, and a pop-up list show appear,then select phpMyAdmin.

Now, create a new database. Give it any name, but you need to keep it in mind as we need itat the WP installation. As for now, we are done with WAMP Server, just leave it running.

WordPress Installation

After copying all the files, you need to install WordPress. Enter on the address where you have put the WP files. The address wouldbe exactly, without any www or http, localhost or localhost/WordPress. After accessing the address, the installation may start.

Click “Create a Configuration File”. After this, you will see some listing of things you need to know. I’ll just tell you what you need:

  1. Database name: your given name of the database we’ve created earlier
  2. Database username: thisshould be “root”if you set it on your computer.
  3. Database password: there is no password set.
  4. Database host: localhost
  5. Table prefix: for now, leave it as it is.

Now, just fill in the fields with the required information, and go further! After filling up the fields, next give any name to your blog, and write your e-mail address.

Now, copy the auto generated password, and paste it in the password field at the site login. Now, because you cannot keep that weird password in mind, go the upper right corner of the site and click on “admin”. You should see a page where you have your account info. You can modify anything there, but for now we are setting a new and easier password.

Go to the bottom where it says “New password” and set your new password.

Good, now you have WP installed, but we have a lot more things to do.

1. Planning the theme layout

When I’m starting a new project on developing a WordPress theme, as everyone should do, I first build my HTML/CSS template. This is easier because you also learn how toconvert a simple HTML template into a fully functional WordPress theme. So i won’t go through building the template, considering you already know how to build your own. I’ll just use a simple layout from Free-CSS.com in this tutorial. Go here and download the #7 template.

2. Starting the conversion

When I’m making a theme, I’m always copying code snippets from a default WordPress theme (because i cannot remember all of them). I use the WordPress Classic theme, but you can also use a cheat sheet. The best one i’ve found is the one created by Ekinertac. After it opens in the PDF format, save it in your computer (you may need it when you do not have access to the internet).

All the contents from the sheetare the most used functions from WordPress, and the ones that you need to create a basic WP theme.

A thing that you have to notice is that WordPress is using PHP. Even if you aren’t a PHP master, or you have absolutely no idea what PHP is, you are still able to create a basic theme. When creating a theme, you need to know just tags and what they are doing, so do not worry about PHP.

2.1 Making the theme recognizable by WordPress

A very important part ofa WordPress themeis the CSS file. In the CSS file are written some lines that WordPress is using to g a theme. First, you need to rename the styles.css to style.css as WordPress is search for style not styles. Copy and paste these lines at the start of your CSS file:

/*
Theme Name: Free-CSS template WP version
Theme URI: <a href="http://free-css.com/">http://free-css.com</a>
Description: A very basic  WP theme based on a simple CSS layout from Free-CSS.com
Version: 1
Author:  >your name<
Author URI: >your site url<
Tags: free, css,  tutorial, simple, basic
*/

You can change everything that is located after the “:” dots. Save your CSS file as we won’t need it because we are just trying to give to the HTML template functionality.

2.2 Converting the HTML file

After you set up your CSS file, we need to go and change some things in the index.html file. First of all, clear all the sample text.
Save you file as index.php. We do not need the sample text anymore as we will introduce our own text from WordPress later.

Now, we need to make some declarations for the WP theme. We need to make the title dynamic and to set the stylesheet path. These lines will help you:

<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
<style type="text/css" media="screen">@import url( <?php bloginfo('stylesheet_url'); ?> );</style>

Now, we will start with the header of the design. For adding your blog’s name with a link to your homepage in the header, we will use this line of code:

<h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>

The first PHP tag is used for retrieving the blog’s homepage link and the second is for the blog’s name (the one you set in the installation).

Now we’re going further for the loop. The loop is a block of code that will repeat for each post from WordPress. We will use the loop to construct the article. I’ll cover more about the loop in the second part, where we will use it for other things too.

Now, all your code is wrapper by some loop specific tags. Here they are:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<!--Code to be repeated here-->

<?php endwhile; else: ?>
<?php endif; ?>

Next, we will start constructing the article structure. We will need a title, some info about the dat when the article was published and it’s author.

The following line makes the article title:

<p><strong><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></strong></p>

The first PHP tag is for the article’s link and the second is for the article title. These tags are kinda self-explanatory. We’re moving further for the meta data (date, author). Copy and paste the following code under the article title code:

<p>Published on <?php the_time('F d, y'); ?> by <?php the_author(); ?> in <?php the_category(','); ?></p>

First tag is for retrieving the date. The date tag have some parameters. These parameters are setting the date format (month, day, year). You can add characters like “-” or “.” or making something like “Month 02 Day 15 Year 1990″, it’s up to you! The second one, is for echoing the author of the post and the third, is for category or categories that the post is filed under.

Now, we will be placing the content tag. The content tag will output everything you write in a WordPress post:

<?php the_content(); ?>

The tag doesn’t need paragraphs because WordPress auto generates them for you. We’re finished with the loop. You can see the code pieces at the party:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
 <p><strong><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></strong></p>
 <p>Published on <?php the_time('m d Y'); ?> by <?php the_author(); ?></p>
 <p><?php the_content(); ?></p>
 <?php endwhile; else: ?>
 <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
 <?php endif; ?>

Next, we will be going to code the sidebar.

We will start with the navigation. As you see in the CSS layout, the navigation is located in the sidebar. It doesn’t matter because the technique is the same. For creating a basic navigation you need these lines of code, which will placed between the <strong>ul </strong>tags:

<li><a href="<?php bloginfo('url'); ?>">Home</a></li>
<?php wp_list_pages('title_li='); ?>

You already know what the first PHP tag does. The second one, is listing the pages that WordPress generates. The parameter is for list title. Try removing it and see what’s happening.

This is all you need to do for getting a nice working navigation menu. Now, we will create the categories list. All the blogs have categories and we don’t want our theme to lack categories. We will just add this code between the div #extra tags:

<p><strong>Categories</strong></p>
<ul>
 <?php wp_list_categories('title_li='); ?>
</ul>

There is another listing tag but this one is listing the blog’s categories. I’ll cover more things relating the sidebar in part 2, where i will teach you how to make a theme widget-ready. That means you will introduce new blocks inside of WordPress, without coding anything.

But what about the footer? Shouldn’t it have some text in it? Well, we will write the copyright:

<p>Copyright &copy; 2010 <a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a>. All rights reserved.</p>

As you see, we have introduced some tags, just like in the header, to output the blog’s title.

The theme is functional, but we will need to make some page templates for single post (where the comments will appear) and the page (where you could write some info about your blog). If you use the same code for the header footer and sidebar, your template would get messy. Let’s say that you want to add one more thing to your sidebar. You will have to modify 3 times for each page template. Well, for avoiding this, we will chop the markup.

For each section of the index.php file we will have a separate file. So we will have header.php, footer.php and sidebar.php. Now, we will be starting to chop!

Copy and then replace the following lines:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
<style type="text/css" media="screen">
@import url( <?php bloginfo('stylesheet_url'); ?> );
</style>
</head>
<body>
<div id="container">
<div id="header"><h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a>
</h1></div>

With the following line:

<?php get_header(); ?>

Your copied code needs to be placed in the header.php file. The same thing we will do with the footer and sidebar

Copy the following:

<div id="navigation">
<p><strong>Navigation Here</strong></p>
<ul>
 <li><a href="<?php bloginfo('url'); ?>">Home</a></li>
<?php wp_list_pages('title_li='); ?>
</ul>
</div>
<div id="extra">
<p><strong>Categories</strong></p>
<ul>
 <?php wp_list_categories('title_li='); ?>
</ul>
</div>

Paste them to sidebar.php then in the index.php file replace it with:

<?php get_sidebar(); ?>

Now, do the same thing with the footer. Copy the footer div and it’s contents, paste it in footer.php file, and then remove it in index.php with:

<?php get_footer(); ?>

You should have something like this:

<?php get_header(); ?>
 <div id="wrapper">
 <div id="content">
 <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
 <p><strong><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></strong></p>
 <p>Published on <?php the_time('m d Y'); ?> by <?php the_author(); ?></p>
 <p><?php the_content(); ?></p>
 <?php endwhile; else: ?>
 <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
 <?php endif; ?>
 </div>
 </div>
 <?php get_sidebar(); ?>
 <?php get_footer(); ?>
</div>
</body>
</html>

Now you’re done with chopping the markup. We are going to create the page templates. We will create firstly the single template. Just save your index.php file as single.php. We won’t modify anything in this page yet. We will do it in part 2 where I will learn you how to create a comment form and how to list comments and other things like custom fields.

Now, for the static page, page template, delete the line where you have placed the meta data (the line with date, author and category tags). Then save the file as page.php. Being a page, we won’t need any info about the creation date or the author. We won’t even use comments on page because there is no point in it.

The last move we need to do is to print screen our template and save it in a canvas of 300 x 225 px and save it as screenshot.png in the root directory of your theme. This will be used in WordPress theme menu.

Well, we’re done with the first part. Go ahead and test your theme. If there is something you want to ask, do it via comments. Don’t forget that you can download the source files too.

To be continued

There are a lot of things to cover about WordPress. Making a theme isn’t so difficult, you just need to be patient. There are a lot of things that are needed to make a fully functional WordPress theme. That’s why, this tutorial will have a Part 2. Maybe there will be more parts, but i will let you know what I will be covering in the next part:

  • Widgetizing the sidebar
  • Using the single page template: comments, custom fields, author details
  • Using custom fields for showing an image for each article
  • Making a nice and working search form

Stay Tuned.

30 Insanely Awesome Websites using WordPress as a CMS

More people already have a WordPress powered site as a blog and some have never know they can use it as a CMS too, but they may have heard of it. In reality, WordPress is an awesome tool for managing your different kinds of sites as a CMS. When I tell people about this, they often ask me for some examples of non-blogging sites using WordPress, so i want to show something that really stands out.

Now Im finally going to showcase a good selection of sites that I can point them to for several examples. Some sites just look good. Some are examples of famous celebrities, companies, or organizations. WordPress can be used for serious projects that can go big scale, we are highlighting the most popular brands that are using WordPress.There’s no particular order here.

1.Nikonfestival

A video contest website from Nikonfestival.Those are 140 seconds or less videos. Powered by WordPress

2.Icondock

Icon Dock is a project from N.Design Studio. Offer stock icons in vector and pixel format that you can quickly snap in your projects to speed up the development. Just see how the arrangement of content has been made using WordPress.

3.Krispkrush

Design work and consultancy. Process of definition of the project,objectives are to deliver ergonomic and impacting creative contents.

4.Typographica

Typographica is for review of typefaces and type books, with occasional commentary on fonts and typographic design. Another awesome example of WordPress as CMS.

5.Creativeawards

Creative Ad Awards is one of the best advertising archive, serving all the advertising fan and others who need it. You will feel comfortable here, because of WordPress customization.

6.Good

GOOD is a collaboration of individuals, businesses, and nonprofits pushing the world forward.This website is an ongoing exploration of what GOOD is and what it can be.

7.Champagnewarehouse

8.Fordstory

The fordstory website is about their new technology and current updates.You can get involved in ideas.

9.Ugsmag

It’s an independent Hip Hop magazine featuring interviews and a daily news feed with underground rap videos, audio and free album downloads. An amazing use of WordPress as CMS. It makes us think that power is in the hands of developer. You just have to mold WordPress according to your needs.

10.Flickout

You can watch the best new HD movie trailers for upcoming releases and movies in theaters. Get movie reviews and more all in super High Definition.

11.Typechart

For preview and compare web typography while retrieving the CSS,Browse typographic files.

12.Thesalonhair

13.Kmxus

Website is for selling karts and their accessories.

14.Camachocigars

A brand website for cigars and where to buy those things with events and VIP club.

15.Nowplaying nokia

Website for Rihanna fans all over the USA are sitting with their Nokia’s at the ready to buy tickets for the US leg of her tour.

16.Healogix

Healogix is a global health care marketing research and consulting firm created to meet the needs of executives facing real development and marketing decisions.

17.Platinumgames

Platinum games is powered by wordpress.Developed in conjunction with cnp_studio.

18.Woothemes

Woothemes is one of the best theme shops having beautiful free templates and premium templates too. Their home page shows how to arrange contact in a better way which is a major technique when it comes to using WordPress as cmss

19.Popculturetees

Featuring new designs from the hottest retailers and indie artists, tips ‘n tricks, and interviews from industry experts.

20.H-mag

H-mag is a high-end luxury magazine for the Hoboken market.They are having blogs ,events and news section too.

21.Inbound pass

22.Iokonmedia

IOKON Media is creative collective that specializes in Digital Media and Marketing.

23.Cubicleninjas

24.College crunch

25.Probar

26.Andyroddick

Official Website of Andy Roddick, a very famous tennis star. It is also powered by WordPress.

27.Wpvote

WPVote is a Digg-Like social bookmarking service dedicated to WordPress related links and yes, made with WordPress. You can see the amazing use of WordPress as CMS.

28.Harward University

29.Startupweekend

Startup Weekend has a highly motivated group of developers, business managers, startup enthusiasts, marketing gurus, graphic artists and more to a 54 hour event that builds communities, companies and projects.

30.Spotify

Spotify is a new way to listen to music.Any artist, any album, any genre – all available instantly. With Spotify, there are no limits to the amount of music you could listen to. Another great mod of WordPress as CMS.