5 tips to increase wordPress traffic and look

In article, I explained you the 5 best tips about how to keep your wordpress blog or website impressive and 5 tips to increase wordPress traffic and look. It is very important to increase wordPress traffic by doing some tricks. There are many ways for increase wordPress traffic. But here in this article, I found some very unique increase wordPress traffic tips which are very useful for every web master.

I also did many tricks for my client to increase wordPress traffic. So think deeply about, how to increase wordPress traffic.

increase wordPress traffic

WordPress is becoming most popular CMS these days. It is very easy to use and great search engine support. Following are simple steps which I used to increase wordPress traffic.
Last year wordpress left behind all the cms. Many people are thinking about how to keep the there wordpress site impressive.
In this article I am going tell you the 5 best tips about how to keep your wordpress blog or website impressive.

1. Create a widget controlled footer that keeps visitors busy on site

increase wordPress traffic
increase wordPress traffic

Widget controlled footer is not new thing in wordpress website but still having footer with multiple information is good.
You should keep the following footer widget in website.
1. Recent posts
2. Popular Post
3. Recent Comments
For recent comments you can use following code in footer without plugin

<?php
 $my_query = new WP_Query('showposts=15');
 while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID;
?>

For popular post We can use the wp-popular-post plugin. Using that plugin use can use following code in your website

<?php get_mostpopular("range=weekly&order_by=views&stats_comments=0&limit=20"); ?>

For showing the Recent comments you can use following code without any wordpress plugin. You can change the css code as per your site layout.

<?php
$total_comments = $wpdb->get_results("SELECT comment_date_gmt, comment_author, comment_ID, comment_post_ID, comment_author_email, comment_content FROM $wpdb->comments WHERE comment_approved = '1' and comment_type != 'trackback' ORDER BY comment_date_gmt DESC LIMIT 11");
$comment_total = count($total_comments);
echo '<ul>';
for ($comments = 0; $comments < $comment_total; $comments++) {
echo "<div style='clear:both;width:355px;padding-top:3px;'><div style='float:left;width:35px;'>";
echo get_avatar($total_comments[$comments]->comment_author_email,$size='32',$default='<path_to_url>' );
echo "</div> <div style='width:320px;'>";
echo '<li>';
echo $total_comments[$comments]->comment_author . ' says ';
echo '<a href="'. get_permalink($total_comments[$comments]->comment_post_ID) . '#comment-' . $total_comments[$comments]->comment_ID . '">';
// echo get_the_title($total_comments[$comments]->comment_post_ID);
echo $total_comments[$comments]->comment_content;
echo '</a></li></div></div>';
}
echo '</ul>'
?>

2. Display the interesting images on the homepage

You can increase wordPress traffic and website will look cool with best custom made images.
You can use following code for showing the images on homepage.
First you need to open the functions.php file from your wordpress theme folder and copy paste following code in that file.

function get_first_image($id) {
$PostID = $id;
$all_images =& get_children('post_type=attachment&post_mime_type=image&post_parent=' . $PostID );

if($all_images) {
$arr_of_all_images = array_keys($all_images);
$firstImage = $arr_of_all_images[0];
$thumb_url = wp_get_attachment_thumb_url($firstImage);
$First_thumb_image = '<a href="' . get_permalink() . '">' .
 '<img src="' . $thumb_url . '" width="150" height="150" alt="Thumbnail Image" title="Thumbnail Image" />' .
 '</a>';
 echo $First_thumb_image;
 }
}

In your index.php file you need to copy paste the following code for showing the image.

<?php get_first_image($post->ID);  ?>

3. Add social media links to the bottom of post

Visitors always want to bookmark the website or your posts.
So keeping that very simple adding the social media links to your posts is very nice.
Finding the good social media icons as per your website is very easy with google.

There are some nice wordpress plugins available for adding the social media icons but recommend not to use any wordpress plugin.
Or you can use following code.

<style>
.social_icons{ clear:both; border-top:2px solid #ccc; color:#2266BB; font-size:18px;font-weight:bold;line-height:30px;}
.social_icons ul li {float:left; padding-right:8px;}
</style>
<div >
Bookmark & Share This Post
<ul>
 <li><a rel="nofollow" target="_blank" href="http://images.purabtech.in/feed" title="RSS"><img src="http://images.purabtech.in/rss_32.png" title="RSS" alt="RSS"  /></a></li>
 <li><a rel="nofollow" target="_blank" href="http://del.icio.us/post?url=<?php the_permalink() ?>&title=<?php echo urlencode(the_title('','', false)) ?>" title="del.icio.us"><img src="http://images.purabtech.in/delicious_32.png" title="del.icio.us" alt="del.icio.us"  /></a></li>
 <li><a rel="nofollow" target="_blank" href="http://www.stumbleupon.com/submit?url=<?php the_permalink() ?>&title=<?php echo urlencode(the_title('','', false)) ?>" title="StumbleUpon"><img src="http://images.purabtech.in/stumbleupon_32.png" title="StumbleUpon" alt="StumbleUpon"  /></a></li>
 <li><a rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&url=<?php the_permalink() ?>&title=<?php echo urlencode(the_title('','', false)) ?>" title="Digg"><img src="http://images.purabtech.in/digg_32.png" title="Digg" alt="Digg"  /></a></li>
 <li><a rel="nofollow" target="_blank" href="http://twitthis.com/twit?url=<?php the_permalink() ?>" title="TwitThis"><img src="http://images.purabtech.in/twitter_32.png" title="TwitThis" alt="TwitThis"  /></a></li>

 <li><a rel="nofollow" target="_blank" href="http://www.mixx.com/submit?page_url=<?php the_permalink() ?>&title=<?php echo urlencode(the_title('','', false)) ?>" title="Mixx"><img src="http://images.purabtech.in/mixx_32.png" title="Mixx" alt="Mixx"  /></a></li>
 <li><a rel="nofollow" target="_blank" href="http://technorati.com/faves?add=<?php the_permalink() ?>" title="Technorati"><img src="http://images.purabtech.in/technorati_32.png" title="Technorati" alt="Technorati"  /></a></li>
 <li><a rel="nofollow" target="_blank" href="http://www.facebook.com/sharer.php?u=<?php the_permalink() ?>&t=<?php echo urlencode(the_title('','', false)) ?>" title="Facebook"><img src="http://images.purabtech.in/facebook_32.png" title="Facebook" alt="Facebook"  /></a></li>
 <li><a rel="nofollow" target="_blank" href="http://www.newsvine.com/_tools/seed&save?u=<?php the_permalink() ?>&h=<?php echo urlencode(the_title('','', false)) ?>" title="NewsVine"><img src="http://images.purabtech.in/newsvine_32.png" title="NewsVine" alt="NewsVine"  /></a></li>
 <li><a rel="nofollow" target="_blank" href="http://reddit.com/submit?url=<?php the_permalink() ?>&title=<?php echo urlencode(the_title('','', false)) ?>" title="Reddit"><img src="http://images.purabtech.in/reddit_32.png" title="Reddit" alt="Reddit"  /></a></li>
 <li><a rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&bkmk=<?php the_permalink() ?>&title=<?php echo urlencode(the_title('','', false)) ?>" title="Google"><img src="http://images.purabtech.in/google_32.png" title="Google" alt="Google" /></a></li>

 <li><a rel="nofollow" target="_blank" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=<?php the_permalink() ?>&=<?php echo urlencode(the_title('','', false)) ?>" title="YahooMyWeb"><img src="http://images.purabtech.in/yahoobuzz_32.png" title="YahooMyWeb" alt="YahooMyWeb"  /></a></li>

 <li><a rel="nofollow" target="_blank" href="mailto:?subject=<?php echo urlencode(the_title('','', false)) ?>&body=<?php the_permalink() ?>" title="E-mail this story to a friend!"><img src="http://images.purabtech.in/email_32.png" title="E-mail this story to a friend!" alt="E-mail this story to a friend!"  /></a></li>

</ul>
</div>

4. Install the Tweetmeme style Twitter button to your posts

Twitter is very popular these days. Twitter is micro blogging website.
So many people want to share there articles with twitter and Many visitors want to share article with there friends and follower by tweeting the article.
I recommend to use the tweetmeme wordpress plugin for putting the Twitter button to your posts.

You can download the tweetmeme wordpress plugin from following URL
http://tweetmeme.com

5. Always show the Author information with photo

Many visitors want to know about author. Keeping Author’s information on wordpress website is really good idea.
That will become your website more interesting the user friendly to visitors.
Some people like the specific writing style of author and They want know more information about Author.

In wordpress keeping the users photo and information I will suggest to use the user-photo wordpress plugin.
http://wordpress.org/extend/plugins/user-photo/
After adding following plugin you can use following code in your wordpress posts.

<?php userphoto_the_author_photo(); ?>

Free WordPress theme MDesign for download

This wordpress theme is very simple blog design with sober colors.  this theme has left sidebar and simple bold title. This website is submitted by Mahesh Kshirsagar.

Free WordPress theme MDesign for download

MDesign

 

Free simple WordPress theme MDesign for download
Free simple WordPress theme MDesign for download

[viral-lock message=”Download and Demo Link is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]

Demo | Download

[/viral-lock]

how to create wordpress theme from scratch

many people written about creating wordpress theme and using wordpress hooks. Here in this tutorial I will show How to create wordpress theme from scratch.

create wordpress theme from scratch

Here in this tutorial I will show How to create wordpress theme from scratch. I given very detailed steps to create wp theme. You can create wp theme from simple jpg file or PSD file. First choose or create your html template from photoshop. For creating the html template you can refer following screen shots for creating photoshop image. This is very common layout for creating any webpage.

 

create wordpress theme from scratch
create wordpress theme from scratch

Here for this tutorial I am using following image for creating the wordpress theme.

create wordpress theme from scratch
create wordpress theme from scratch

After creating image in photoshop you need to create the html according to this image. Here I created the one index.html file and style.css file.
You can download the HTML from here:

wp-bluemagic-html

Now we can start creating the wordpress theme.
First create style.css file and in top section copy paste the following code:

/*
Theme Name: wp-bluemagic
Theme URI: purabtech.in/files/
Description: two column, blue color wordpress theme
Author: wordpressapi
Author URI: purabtech.in/files/
Version: 1.0

*/

You can change the information as per your requirement.

For creating the wordpress theme following minimum files are needed in wordpress theme folder.
1.    index.php
2.    header.php
3.    footer.php
4.    sidebar.php
5.    comments.php
6.    functions.php – not necessary
7.    screenshot.png

Here is my html code from index.html file rename that file to base.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Wordpressapi.com - wp-bluemagic</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
 <div id="header">
 <div id="logo">
 <h1><a href="#">wp-bluemagic   </a></h1>

 </div>
 </div>
 <!-- header end -->
 <div id="menu">
 <ul>
 <li><a href="#">Home</a></li>
 <li><a href="#">Blog</a></li>
 <li><a href="#">Photos</a></li>
 <li><a href="#">About</a></li>
 <li><a href="#">Links</a></li>
 <li><a href="#">Contact</a></li>
 </ul>
 </div>
 <!-- menu end-->
 <div id="page">
 <div id="page-bgtop">
 <div id="page-bgbtm">
 <div id="content">
 <div>
 <h2><a href="#">Lorem Ipsum is simply dummy text of the printing and typesetting industry.</a></h2>
 <p><span>September 10, 2009</span><span>Posted by <a href="#">wordpressapi</a></span></p>
 <div style="clear: both;">&nbsp;</div>
 <div>
 <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
 <p><a href="#">Read More</a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">Comments</a></p>
 </div>
 </div>
 <div>
 <h2><a href="#">Lorem Ipsum is simply dummy text of the printing and typesetting industry.</a></h2>
 <p><span>September 10, 2009</span><span>Posted by <a href="#">wordpressapi</a></span></p>
 <div style="clear: both;">&nbsp;</div>
 <div>
 <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
 <p><a href="#">Read More</a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">Comments</a></p>
 </div>
 </div>
 <div>
 <h2><a href="#">Lorem Ipsum is simply dummy text of the printing and typesetting industry.</a></h2>
 <p><span>September 10, 2009</span><span>Posted by <a href="#">wordpressapi</a></span></p>
 <div style="clear: both;">&nbsp;</div>
 <div>
 <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum..</p>
 <p><a href="#">Read More</a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">Comments</a></p>
 </div>
 </div>
 <div style="clear: both;">&nbsp;</div>
 </div>
 <!--content end-->
 <div id="sidebar">
 <ul>
 <li>
 <h2>Author Information</h2>
 <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
 </li>
 <li>
 <h2>Categories</h2>
 <ul>
 <li><a href="#">wordpress </a></li>
 <li><a href="#">wordpress theme</a></li>
 <li><a href="#">wordpress plugins</a></li>
 <li><a href="#">wordpress tips</a></li>
 <li><a href="#">wordpress hacks</a></li>
 <li><a href="#">wordpressapi</a></li>
 <li><a href="#">wordpress tutorials</a></li>
 </ul>
 </li>
 <li>
 <h2>Blogroll</h2>
 <ul>
 <li><a href="#">wordpress.com</a></li>
 <li><a href="#">wordpress.org</a></li>
 <li><a href="#">purabtech.in/files/</a></li>
 <li><a href="#">google.com</a></li>
 <li><a href="#">yahoo.com</a></li>
 <li><a href="#">live.com</a></li>
 <li><a href="#">facebook.com</a></li>
 </ul>
 </li>
 <li>
 <h2>Archives</h2>
 <ul>
 <li><a href="#">march 2010</a></li>
 <li><a href="#">feb 2010</a></li>
 <li><a href="#">january 2009</a></li>
 <li><a href="#">december 2009</a></li>
 <li><a href="#">november 2009</a></li>
 <li><a href="#">september 2009</a></li>
 <li><a href="#">july 2009</a></li>
 </ul>
 </li>
 </ul>
 </div>
 <!-- end #sidebar -->
 <div style="clear: both;">&nbsp;</div>
 </div>
 </div>
 </div>
 <!-- end #page -->
</div>
 <div id="footer">
 <p>Copyright (c) 2010 purabtech.in/files/. All rights reserved. Design and Developed by <a href="http://www.wordpressapi.org/">wordpressapi themes</a>.</p>
 </div>
 <!-- end #footer -->
</body>
</html>

Now we are going start to create the wordpress theme from html file which we created earlier.

First create the header.php file and copy paste the following code in that file. I taken the top header HTML code from base.html file.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="all" />
<?php wp_head(); ?>
</head>
<body>
<div id="wrapper">
 <div id="header">
 <div id="logo">
 <h1><a href="<?php bloginfo('siteurl');?>/"><?php bloginfo('name');?> </a></h1>
 </div>
 </div>
 <!-- header end -->
 <div id="menu">
 <ul>
 <licurrent_page_item";}?>" ><a href="<?php echo get_settings('home'); ?>">Home</a></li>
 <?php wp_list_pages('title_li=&depth=4&sort_column=menu_order&exclude=827'); ?>
 </ul>
 </div>
 <!-- menu end-->
<!-- end header -->

Create the index.php file and copy paste the following code in that file. I taken the middle or inner part of  HTML code from base.html file.

<?php get_header(); ?>
<div id="page">
 <div id="page-bgtop">
 <div id="page-bgbtm">
 <div id="content">
 <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
 <div>
 <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
 <p><span><?php the_time('F - j - Y'); ?></span><span>Posted by <a href="<?php the_author_link(); ?>"><?php the_author(); ?></a></span></p>
 <div style="clear: both;">&nbsp;</div>
 <div>
 <p><?php the_content(); ?></p>
 <p><a href="<?php the_permalink(); ?>">Read More</a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<?php comments_popup_link('COMMENTS', '1 COMMENT', '% COMMENTS'); ?></p>
 </div>
 </div>
 <?php comments_template(); // Get wp-comments.php template ?>
 <?php endwhile; else: ?>
 <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
 <?php endif; ?>
<?php posts_nav_link(' — ', __('&laquo; Newer Posts'), __('Older Posts &raquo;')); ?>
 <div style="clear: both;">&nbsp;</div>
 </div>
 <!--content end-->
 <?php get_sidebar(); ?>
 <div style="clear: both;">&nbsp;</div>
 </div>
 </div>
 </div>
 <!-- end #page -->
<?php get_footer(); ?>

Create the footer.php file and copy paste the following code in that file. I taken the bottom footer HTML code from base.html file.

</div>
 <div id="footer">
 <p>Copyright (c) 2010 purabtech.in/files/. All rights reserved. Design and Developed by <a href="http://www.wordpressapi.org/">wordpressapi themes</a>.</p>
 </div>
 <!-- end #footer -->
<?php wp_footer(); ?>
</body>
</html>

Create the sidebar.php file and copy paste the following code in that file. I taken the only the sidebar HTML code from base.html file. I taken only sidebar div from html and li tags and other widgets will be provided by wordpress admin, so you dont worry about that part.

<div id="sidebar">
<ul>
<?php     /* Widgetized sidebar, if you have the plugin installed. */
 if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
<?php endif; ?>
</ul>
</div>
<!-- end sidebar -->

Create the comments.php file and copy paste the following code in that file. I did not taken HTML code or php from base.html file. This is common wordpress comments template. If you are designer then you dont need to worry about comments code. you just need to copy paste the following code into comments.php file

<?php

if ( post_password_required() ) : ?>
<p><?php _e('Enter your password to view comments.'); ?></p>
<?php return; endif; ?>

<h2 id="comments"><?php comments_number(__('No Comments'), __('1 Comment'), __('% Comments')); ?>
<?php if ( comments_open() ) : ?>
 <a href="#postcomment" title="<?php _e("Leave a comment"); ?>">&raquo;</a>
<?php endif; ?>
</h2>

<?php if ( have_comments() ) : ?>
<ol id="commentlist">

<?php foreach ($comments as $comment) : ?>
 <li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>">
 <?php echo get_avatar( $comment, 32 ); ?>
 <?php comment_text() ?>
 <p><cite><?php comment_type(_x('Comment', 'noun'), __('Trackback'), __('Pingback')); ?> <?php _e('by'); ?> <?php comment_author_link() ?> — <?php comment_date() ?> @ <a href="#comment-<?php comment_ID() ?>"><?php comment_time() ?></a></cite> <?php edit_comment_link(__("Edit This"), ' |'); ?></p>
 </li>

<?php endforeach; ?>

</ol>

<?php else : // If there are no comments yet ?>
 <p><?php _e('No comments yet.'); ?></p>
<?php endif; ?>

<p><?php post_comments_feed_link(__('<abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.')); ?>
<?php if ( pings_open() ) : ?>
 <a href="<?php trackback_url() ?>" rel="trackback"><?php _e('TrackBack <abbr title="Universal Resource Locator">URL</abbr>'); ?></a>
<?php endif; ?>
</p>

<?php if ( comments_open() ) : ?>
<h2 id="postcomment"><?php _e('Leave a comment'); ?></h2>

<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
<p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.'), wp_login_url( get_permalink() ) );?></p>
<?php else : ?>

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">

<?php if ( is_user_logged_in() ) : ?>

<p><?php printf(__('Logged in as %s.'), '<a href="'.get_option('siteurl').'/wp-admin/profile.php">'.$user_identity.'</a>'); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account') ?>"><?php _e('Log out &raquo;'); ?></a></p>

<?php else : ?>

<p><input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" tabindex="1" />
<label for="author"><small><?php _e('Name'); ?> <?php if ($req) _e('(required)'); ?></small></label></p>

<p><input type="text" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="22" tabindex="2" />
<label for="email"><small><?php _e('Mail (will not be published)');?> <?php if ($req) _e('(required)'); ?></small></label></p>

<p><input type="text" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" size="22" tabindex="3" />
<label for="url"><small><?php _e('Website'); ?></small></label></p>

<?php endif; ?>

<!--<p><small><strong>XHTML:</strong> <?php printf(__('You can use these tags: %s'), allowed_tags()); ?></small></p>-->

<p><textarea name="comment" id="comment" cols="58" rows="10" tabindex="4"></textarea></p>

<p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php esc_attr_e('Submit Comment'); ?>" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
</p>
<?php do_action('comment_form', $post->ID); ?>

</form>

<?php endif; // If registration required and not logged in ?>

<?php else : // Comments are closed ?>
<p><?php _e('Sorry, the comment form is closed at this time.'); ?></p>
<?php endif; ?>

Create the functions.php file and copy paste the following code in that file. In this file we are just registering the sidebar widgets, using following function.

<?php
automatic_feed_links();

if ( function_exists('register_sidebar') )
 register_sidebar();

?>

Here is my style.css file. You can create this file as per your theme. We are using the same css which we created for base.html, We just added some of extra code for wordpress theme and img alignment.

/*
Theme Name: wp-bluemagic
Theme URI: purabtech.in/files/
Description: two column, blue color wordpress theme
Author: wordpressapi
Author URI: purabtech.in/files/
Version: 1.0

*/

body {
 margin: 0;
 padding: 0;
 background: #FFFFFF;
 font-family: Arial, Helvetica, sans-serif;
 font-size: 12px;
 color: #787878;
}

h1, h2, h3 {
 margin: 0;
 padding: 0;
 font-weight: normal;
 color: #32639A;
}

h1 {
 font-size: 2em;
}

h2 {
 font-size: 2.4em;
}

h3 {
 font-size: 1.6em;
}

p, ul, ol {
 margin-top: 0;
 line-height: 180%;
}

ul, ol {
}

a {
 text-decoration: none;
 color: #4486C7;
}

a:hover {
}

#wrapper {
 width: 960px;
 margin: 0 auto;
 padding: 0;
}

/* Header */

#header {
 width: 940px;
 height: 148px;
 margin: 0 auto;
 background: #4169E1;
}

/* Logo */

#logo {
 float: left;
 margin: 0;
 padding-top: 30px;
 color: #000000;
}

#logo h1, #logo p {
 margin: 0;
 padding: 0;
}

#logo h1 {
 float: left;
 padding-left: 80px;
 letter-spacing: -1px;
 text-transform: lowercase;
 font-size: 3.8em;
}

#logo p {
 float: left;
 margin: 0;
 padding: 26px 0 0 10px;
 font: normal 14px Georgia, "Times New Roman", Times, serif;
 font-style: italic;
 color: #FFFFFF;
}

#logo a {
 border: none;
 background: none;
 text-decoration: none;
 color: #FFFFFF;
}
/*img align*/
img.centered  {
 display: block;
 margin-left: auto;
 margin-right: auto;
 margin-bottom: 10px;
 padding: 0px;
 }

img.alignnone {
 padding: 5px 5px;
 margin: 0px 0px 10px 0px;
 display: inline;
 background:#E3E8E0;
 border: 1px solid #C7CFC2;
 }

img.alignright {
 padding: 5px 5px;
 margin: 5px 0px 5px 5px;
 display: inline;
 background:#E3E8E0;
border: 1px solid #C7CFC2;
 }

img.alignleft {
 padding: 5px 5px;
 margin: 5px 5px 5px 0px;
 display: inline;
 background:#E3E8E0;
border: 1px solid #C7CFC2;
 }

.aligncenter {
 display: block;
 margin-left: auto;
 margin-right: auto;
 margin-bottom: 10px;
 }

.alignright {
 float: right;
 margin: 0px 0px 10px 10px;
 }

.alignleft {
 float: left;
 margin: 0px 10px 10px 0px;
 }

.wp-caption {
 border: 1px solid #C7CFC2;
 text-align: center;
 background-color: #E3E8E0;
 padding: 4px 0px 5px 0px;
 color:#222;
 }

.wp-caption img {
 margin: 0px 0px 5px 0px;
 padding: 0px;
 border: 0px;

 }

.wp-caption p.wp-caption-text {
 margin: 0px;
 padding: 0px 0px 0px 0px;
 font-size: 11px;
 font-weight: normal;
 line-height: 12px;
 }

/* Search */

#search {
 float: right;
 width: 280px;
 height: 60px;
 padding: 20px 0px 0px 0px;
 background: #4169E1;
 border-bottom: 4px solid #FFFFFF;
}

#search form {
 height: 41px;
 margin: 0;
 padding: 10px 0 0 20px;
}

#search fieldset {
 margin: 0;
 padding: 0;
 border: none;
}

#search-text {
 width: 170px;
 padding: 6px 5px 2px 5px;
 border: none;
 background: #FFFFFF;
 text-transform: lowercase;
 font: normal 11px Arial, Helvetica, sans-serif;
 color: #5D781D;
}

#search-submit {
 width: 50px;
 height: 23px;
 border: 1px solid #89B056;
 background: none;
 font-weight: bold;
 font-size: 10px;
 color: #FFFFFF;
}

/* Menu */

#menu {
 width: 940px;
 height: 49px;
 margin: 0 auto;
 padding: 0;
 background:#4169E1;
}

#menu ul {
 margin: 0;
 padding: 0;
 list-style: none;
 line-height: normal;
}

#menu li {
 float: left;
}

#menu a {
 display: block;
 width: 155px;
 height: 33px;
 padding-top: 16px;
 text-decoration: none;
 text-align: center;
 font-family: Arial, Helvetica, sans-serif;
 font-size: 13px;
 font-weight: bold;
 color: #FFFFFF;
 border: none;
}

#menu a:hover, #menu .current_page_item a {
 background: #659CEF;
 text-decoration: none;
}

#menu .current_page_item a {
 background: #FBFBFC;
 padding-left: 0;
 color: #30476A;
}

/* Page */

#page {
 width: 940px;
 margin: 0 auto;
 padding: 0;
}

#page-bgtop {
 padding: 20px px;
}

#page-bgbtm {
}

/* Content */

#content {
 float: left;
 width: 620px;
 padding: 30px 0px 0px 0px;
}

.post {
 margin-bottom: 15px;
}

.post-bgtop {
}

.post-bgbtm {
}

.post .title {
 margin-bottom: 10px;
 padding: 12px 0 0 0px;
 letter-spacing: -.5px;
 color: #000000;
}

.post .title a {
 color: #32639A;
 border: none;
}

.post .meta {
 height: 30px;
 background: #D8E7FE;
 margin: 0px;
 padding: 0px 0px 0px 0px;
 text-align: left;
 font-family: Arial, Helvetica, sans-serif;
 font-size: 13px;
 font-weight: bold;
}

.post .meta .date {
 float: left;
 height: 24px;
 padding: 3px 15px;
 color: #4A81DE;
}

.post .meta .posted {
 float: right;
 height: 24px;
 padding: 3px 15px;
 background: #4169E1;
 color: #FFFFFF;
}

.post .meta a {
 color: #FFFFFF;
}

.post .entry {
 padding: 0px 0px 20px 0px;
 padding-bottom: 20px;
 text-align: justify;
}

.links {
 padding-top: 20px;
 font-size: 12px;
 font-weight: bold;
}

/* Sidebar */

#sidebar {
 float: right;
 width: 280px;
 padding: 0px;
 color: #787878;
 background: #FFFFFF;
}

#sidebar ul {
 margin: 0;
 padding: 0;
 list-style: none;
}

#sidebar li {
 margin: 0;
 padding: 0;
 border-left: 1px solid #E2E2E2;
}

#sidebar li ul {
 margin: 0px 0px;
 padding-bottom: 30px;
}

#sidebar li li {
 line-height: 35px;
 border-bottom: 1px dashed #D1D1D1;
 margin: 0px 30px;
 border-left: none;
}

#sidebar li li span {
 display: block;
 margin-top: -20px;
 padding: 0;
 font-size: 11px;
 font-style: italic;
}

#sidebar h2 {
 height: 38px;
 padding-left: 30px;
 letter-spacing: -.5px;
 font-size: 1.8em;
}

#sidebar p {
 margin: 0 0px;
 padding: 0px 30px 20px 30px;
 text-align: justify;
}

#sidebar a {
 border: none;
}

#sidebar a:hover {
 text-decoration: underline;
 color: #8A8A8A;
}

/* Calendar */

#calendar {
}

#calendar_wrap {
 padding: 20px;
}

#calendar table {
 width: 100%;
}

#calendar tbody td {
 text-align: center;
}

#calendar #next {
 text-align: right;
}

/* Footer */

#footer {
 height: 50px;
 margin: 0 auto;
 padding: 0px 0 15px 0;
 background: #D8E7FE;
 border-top: 1px solid #D3DEF0;
 font-family: Arial, Helvetica, sans-serif;
}

#footer p {
 margin: 0;
 padding-top: 20px;
 line-height: normal;
 font-size: 10px;
 text-transform: uppercase;
 text-align: center;
 color: #A0A0A0;
}

#footer a {
 color: #5389E0;
}

Now wordpress theme is complete. You can upload this whole folder the wp-content/themes directory and activate the theme.

You can download this wordpress theme code form here. Wp-bluemagic

Please write comment for this Post: create wordpress theme from scratch

use captcha code in wordpress registration

So for stopping the automated computer spam we need to use captcha code in wp. in this article i showed how to use captcha code in wordpress registration.

WordPress is becoming very popular for these days. So many people are using wordpress as a CMS and networking website. With wordpress doing registration or commenting on post is so easy. So for stopping the automated computer spam we need to use captcha code in wordpress. in this article i showed how to use captcha code in wordpress registration.

use captcha code in wordpress registration

What is Captcha Code?

CAPTCHA code was created to stop automated computer spam robots from filling out forms, harvesting email addresses, and then sending out countless spam emails.

use captcha code in wordpress registration
use captcha code in wordpress registration

The CAPTCHA security image works by asking the website visitor to type in a code they see correctly. A human can do this, but an automated computer program cannot.In wordpress there are so many free wordpress plugins are available. Here in this article I am going to tell you, how to use captcha code in wordpress website.

Captcha (https://wordpress.org/plugins/captcha/)

The Captcha plugin allows you to implement a super security captcha form into web forms. It protects your website from spam by means of math logic, easily understood by human beings. You will not have to spend your precious time on annoying attempts to understand hard-to-read words, combinations of letters or pictures that make your eyes pop up. All you need is to do one of the three basic maths actions – add, subtract and multiply. This captcha can be used for login, registration, password recovery, comments forms. There is also a premium version of the plugin, allowing compatibility with BuddyPress (Registration form, Comments form, “Create a Group” form) and Contact Form 7.

use captcha code in wordpress registration
use captcha code in wordpress registration

SI CAPTCHA Anti-Spam (https://wordpress.org/plugins/si-captcha-for-wordpress/)

Adds CAPTCHA anti-spam methods to WordPress forms for comments, registration, lost password, login, or all. In order to post comments or register, users will have to type in the code shown on the image. This prevents spam from automated bots. Adds security. Works great with Akismet. Also is fully WP, WPMU, and BuddyPress compatible.

use captcha code in wordpress registration
use captcha code in wordpress registration

1. Simple CAPTCHA

A CAPTCHA for your comment system to prevent unwanted spams. Prevent automated spams by bots and most important naughty peoples. It’s simple and yet secure.

2. Security Captcha

Prevent registration spam and bots login by adding custom captcha tests in the registration page and/or login page

3. WP Captcha-Free

WP Captcha-Free blocks automated comment spam without resorting to CAPTCHAs. It does so by validating a hash based on time (and some other parameters) using AJAX when the form is posted. Comments posted via automated means will not have a hash or will have an expired hash and will be rejected. Unlike using a captcha, this does not place any burden on the commenter.

4. Raz-Captcha

Prevent registration spam and bots login by adding custom captcha tests in the registration page and/or login page

Featuring 5 different and customizable captcha algorithms with possibility to set your own random characters font, styles, colors background and more

5. Really Simple CAPTCHA

Really Simple CAPTCHA does not work alone and is intended to work with other plugins. It is originally created for Contact Form 7, however, you can use it with your own plugin.

Note: This product is “really simple” as its name suggests, i.e., it is not strongly secure. If you need perfect security, you should try other solutions.

6. WPMU Super CAPTCHA

This plugin was developed primarily for the WordPress Muti-User edition and now works with Buddypress, however it works on the regular single domain version as well. It combats spam bots from flooding you with sign-ups and blog creations and it keeps bots from brute- force attacking your site with the admin username by forcing a visual confirmation CAPTCHA in order to login. Most CAPTCHA systems for WordPress gives you a very templated layout and read-out, many that can be programmed into a bot to bypass. With Super CAPTCHA, you can personalize and control the very way the CAPTCHA is rendered so every site that displays the CAPTCHA will be diffrent, making it so each bot has to be pre-configured, just for your site, in order to achieve a successful attack making Super CAPTCHA the MOST SECURE free anti-spam system available for WordPress.

How to Embed a YouTube Video in WordPress

If you want to add the youtube or google and any third-party video in wordpress. It is really easily achievable. How to Embed a YouTube Video in WordPress.

How to Embed a YouTube Video in WordPress

WordPress itself provides to upload and submit youtube video in wordpress post. Just open wordpress admin panel and click on Add new post button.

Select the From URL tab. Paste the YouTube video’s URL into the URL field. Then click the Insert into Post button.

You can change the height and width of video using following code

[ youtube=http://www.youtube.com/watch?v=H2Ncxw1xfck&w=320&h=240]

I suggest to use Viper’s Video Quicktags wordpress plugin. I really like this wordpress plugin for embedding the third party video in wordpress blog or post.

You can download this plugin from following URL:

http://wordpress.org/extend/plugins/vipers-video-quicktags/

This plugin give you really great control with video player and size of video player. After installing the plugin you will find the “video quicktag” option in setting tab. Screenshot as follows:

Open the add new post tab, you will find very cool options for adding the video in post.

You just need to add the video URL in the dialog box.

How to show recent posts without wordpress plugin

When we are work with wordpress theme. So many times we want to show recent posts without wordpress plugin in wordpress theme.  Many people suggest to use wordpress plugin for showing the recent post.

How to show recent posts without wordpress plugin

But I suggest not to use any wordpress plugin for showing the recent posts in wordpress theme.

In this tutorial I will tell very simple technique to show recent posts. Following code you can use in your sidebar.php or in footer.php or anywhere as per your theme requirement.

Just put following code in your theme file. You just need to change the showposts count as per choice.


<?php
 $recent_posts = new WP_Query('showposts=15');
 while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID;
?>

Your recent post will look this. You just need to customize css as per your wordpress theme.

show recent posts without wordpress plugin
show recent posts without wordpress plugin

create 404 page in wordpress theme with classic design

Many wordpress theme developer when create new wordpress theme, they need to think about 404 page must. In this article I going to give you information about how to create 404 page in wordpress theme with classic design.

create 404 page in wordpress theme

What is 404 page?

The 404 or Not Found error message is an HTTP standard response code indicating that the client was able to communicate with the server but the server could not find what was requested. 404 errors should not be confused with “server not found” or similar errors, in which a connection to the destination server could not be made at all. Another similar error is “410: Gone”, which indicates that the requested resource has been intentionally removed and will not be available again. A 404 error indicates that the requested resource may be available in the future.

I recommend to wordpress theme developer create customize 404 page in wordpress theme. Go to google custom search engine page and get google search engine code for your website from following URL:

http://www.google.com/cse/

Use following code creating the 404 page in wordpress theme.


<?php get_header(); ?>

<?php get_sidebar(); ?>

<div class="text" style="padding:50px 0 0 150px; ">

<img src="<?php bloginfo('template_url'); ?>/images/octocat_happy.gif">
<h1 class="title">Page Not Found</h1>
<p>We are sorry about!</p>
<p>Please try search again from here:</p><br>

<form action="http://images.purabtech.in/search-result/" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="partner-pub-4949877136251097:p4u7h8-3y7v" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="text" name="q" size="25" />
<input type="submit" name="sa" value="Search" />
</div>
</form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script>

</div>

<?php get_footer(); ?>

I used here my websites search engine code. Dont forget to change the google search engine code as your web site.

404-error-pages-for-your-website-7 create 404 page in wordpress theme
create 404 page in wordpress theme
The 404 or Not Found error message is an HTTP standard response code indicating that the client was able to communicate with the server but the server could not find what was requested. 404 errors should not be confused with “server not found” or similar errors, in which a connection to the destination server could not be made at all. Another similar error is “410: Gone”, which indicates that the requested resource has been intentionally removed and will not be available again. A 404 error indicates that the requested resource may be available in the future.

Best free black WordPress Themes – Dont miss it

So many people like black color. They looking for black and white WordPress themes. We like black themes. Here List of best free black wordpress themes, Black color is always loved by people so here I collected the very nice wordpress themes which are black.

If we kept black color in background then web page will become more attractive as graphic designers are says. I specially like black wordpress themes.

Best free black WordPress Themes – Dont miss it

Here in this article I will give information about some really cool Black WordPress themes.
1. Michael Jackson 1.0

Best free black WordPress Themes - Dont miss it
Best free black WordPress Themes – Dont miss it

Demo | Download

2. Revision 1.0

Best free black WordPress Themes - Dont miss it
Best free black WordPress Themes – Dont miss it

Demo | Download

3. Join Me 1.0

Demo | Download

4. Photo Portfolio 1.0

Demo | Download

5. Randy Candy

Demo | Download

6. Piano Black

Demo | Download

7. Dragonskin

Demo | Download

8. The Scenery

Demo | Download

9. Dreamline

Demo | Download

10. Beardsley

Demo | Download

11. Easy Black WordPress Theme

Demo | Download

12. FMulti WordPress Theme

Demo | Download

13. BlacknBlue WordPress Theme

Demo | Download

14. Darkened Waters WordPress Theme

Demo | Download

15. Hemingway WordPress Theme

Demo | Download

Create fixed side or top buttons in wordpress theme

We can easily introduce fixed side buttons in wordpress or any website. In this article I given code snippet for Create fixed side buttons in wordpress.

Create fixed side buttons in wordpress

Fixing the position of any document element using CSS this is very old technique but still  I am going to give you some good trick to show the twitter button or search buttons or add new button on bottom or sidebar.

Using following CSS code you can integrate the any button on sidebar.


#submit_news { background:transparent url(images/submit-news.png) no-repeat scroll 0px 0px; height:170px; left:0; position:fixed; top:180px; width:40px; }
div#submit_news:hover { background-position:-41px 0px; }
#submit_news a{ display:block; height:170px; width:40px; }

In this tutorial we are using the only one image as a button. As we know we are using the sprite image css here.

Open your header.php file from wordpres theme. and under body tag put following code.

<div id=”submit_news”><a href=”/submit-news” ></a></div>

First you need to create the submit news page in wordpress.

If you want to add the submit news button for your site you can download from here.

wordpress create archive page for wordpress theme

Given code for wordpress create archive page for wordpress theme. search engine sites will look for two main file. First sitemap.xml file and archive page. First I would say somthing about archive page in any website. Archive page is very important for SEO purpose.

Create an Archive Page in your WordPress theme

If you do not having archive page in your website so you are lacking somewhere in SEO for your website.  What I am going to show in this article, How to create the archive page for worpdress theme or website.  In wordpress creating the archive is very easy.

Follow my steps to create the archive page in wordpress site.

  • Open your wordpress theme folder and copy the single.php as named archive.php
    Note: dont copy index.php file as archive.php. It may have different UI and programming attribute in index.php.
  • Then copy archive.php as archive_template.php new file.
  • Open the archive_template.php file and copy paste the following code in top of file.
<?php
/*
Template Name: Archives Page
*/
?>
  • Again open the archive_template.php file and find the post loop. Between the loop copy past the following code.
<h1> All Archives in dropdown</h1>
<select name="archive-dropdown" onChange='document.location.href=this.options[this.selectedIndex].value;'>
 <option value=""><?php echo attribute_escape(__('Select Month')); ?></option>
 <?php wp_get_archives('type=monthly&format=option&show_post_count=1'); ?> </select>

<br><br>
<h1> All category</h1>
<ul><?php wp_list_cats('sort_column=name&optioncount=1') ?></ul>

<br><br>
<h1> All Archives</h1>
<ul><?php wp_get_archives('type=monthly&show_post_count=1') ?></ul>

Above code will give you the archive with dropdown and archive with category name with post count and archive with month and post count.

  • After doing this upload two new files to server in wordpress theme folder (archive.php and archive_template.php).
  • Go to your wordpress Admin panel using browser
  • Create the new page with title “Archive” and put some information about your website in that page.(Dont publish the page wait and follow next steps.)
wordpress create archive page for wordpress theme
wordpress create archive page for wordpress theme
  • Check the template section (right side under attribute section). Choose archive page as template and publish and save the page.

That sit. You are able to see the archive page for your website.