Free WordPress Theme – Elegant Grunge

“Elegant Grunge” is an unwashed yet crisp WordPress theme inspired by wefunction.com. This wordpress theme looks neat and simple yet has sophisticated design, it is one of my favorite free wordpress theme. Below is the features of Elegant Grunge wordpress theme:-

  • Automatic surrounding of all images with a frame packed with eye-candy that makes images really pop out.
  • A ‘photoblog’ tag page that displays entries in a photoblog style.
  • A widget to display thumbnails from latest/random photoblog entries.
  • Very configurable sidebar: Choose from no sidebar, a right sidebar, or two right sidebars
  • The option to select a custom image as the header
  • A custom page template that allows complete customisation of the sidebar: Supply a list of tags to automatically display related posts, and specify any text/html to be displayed.
  • Per-page and per-post configuration to turn on and off automatic image framing, among other things, and a global configuration interface – turn on/off the RSS link, set your own copyright message, or add your own extra header content – like adding a rel=alternate link to your Twitter feed.
  • A ‘feature’ footer that you can add widgets to.

Check out the Demo and Download for free now!!!

How to Display the Total Number of Comments on Your Blog

Who don’t like to have comments on your blog? If your blog has many comments, it can be say that your blogs is popular, at least people like to interact with you to ask question and share information with you. If you really proud with your total number of comments on your blog, and want to show off to visitors.

To display the total number of comments on your blog, simple add the following code to your wordpress files.

<?php
$numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'");
if (0 < $numcomms) $numcomms = number_format($numcomms);
echo "There's ".$numcomms." total comments on my blog";
?>

Special thanks to PHP Magic Book for this awesome code.

Free WordPress Theme – CopyBlogger

Although CopyBlogger theme looks simple design, but it’s seem like a basic framework of wordpress theme. You can modify colors, fonts, and even the tiniest details by utilizing the custom stylesheet solution that is included with the theme download. For those people who like simple theme design for wordpress, perhaps CopyBlogger is the right choice for you.

Check out the Demo and Download for free now!!!

Free WordPress Theme – Rockstar

Rockstar theme is designed and used by Adii quite some times ago and now he is decided to give it free for download. Rockstar theme is a great theme which is built on very popular backend, which includes some non-standard, non-average customisation options; integrated banner ad management; widgetized sidebar, with some Rockstar-specific custom widgets to allow you full control of what happens in your sidebar; and 6 different colour schemes to choose from.

Check out the Demo and Download for free now!!!

How to Display Twitter Count in Plain Text

Many people will use Twitter counter badge from TwitterCounter.com to show twitter count in their website or blog, but twitter counter badges from TwitterCounter.com didn’t come with color personalization, sometimes it can’t match the color of the theme, so I don’t like to use it.

If you want to display Twitter count in plain text, you can follow the below steps.

1. Add the following code to functions.php.

function string_getInsertedString($long_string,$short_string,$is_html=false){
  if($short_string>=strlen($long_string))return false;
  $insertion_length=strlen($long_string)-strlen($short_string);
  for($i=0;$i<strlen($short_string);++$i){
    if($long_string[$i]!=$short_string[$i])break;
  }
  $inserted_string=substr($long_string,$i,$insertion_length);
  if($is_html && $inserted_string[$insertion_length-1]=='<'){
    $inserted_string='<'.substr($inserted_string,0,$insertion_length-1);
  }
  return $inserted_string;
}

function DOMElement_getOuterHTML($document,$element){
  $html=$document->saveHTML();
  $element->parentNode->removeChild($element);
  $html2=$document->saveHTML();
  return string_getInsertedString($html,$html2,true);
}

function getFollowers($username){
  $x = file_get_contents("http://twitter.com/".$username);
  $doc = new DomDocument;
  @$doc->loadHTML($x);
  $ele = $doc->getElementById('follower_count');
  $innerHTML=preg_replace('/^<[^>]*>(.*)<[^>]*>$/',"\\1",DOMElement_getOuterHTML($doc,$ele));
  return $innerHTML;
}

2. Copy and paste the following short code to anywhere on your theme files, remember replace your twitter username.

<?php echo getFollowers("yourtwitterusername")." followers"; ?>

TwiBadge – Show Your Twitter Badge with Easy Personalization

TwiBadge is a wordpress plugin to show your Twitter badge with easy personalization, it display all your tweets and replies from twitter.com/home. Apart from that, this plugin also came with a “follow” button which allows visitor to follow on your twitter.

Below is some features of this plugin:-

  • Integrate Twitter and WordPress seamlessly
  • Show Twitter badge as a WordPress widget
  • Support flash interactive widget
  • Easy personalization, no coding knowledge is needed
  • Support shortcode
  • Support non-widget theme