Easy Post Views for WordPress Theme Developers

People don’t always want popular posts to be taken from the post comments, Jetpack stats or use other available plugins that has things that isn’t needed at all. As a WordPress Theme developer, I always wanted to tackle this problem and make my life simpler. And again, my clients don’t always love to see me using other plugins while i a doing the job.

This small snipped was done for D2A.tv so i could count video views to show popular videos.

To actually get the post views for any post, it isn’t the hard part. Its basically using the Post Meta to count the post views. Again, if you have a blog and you are constantly scrapped by spiders, search engine bots the post views count can actually go vague.

So here is what I did:

  • Count each views and store into Post Meta
  • Didn’t use direct wp_head or wp_footer hooks, instead used ajax and JavaScript to track only browser hits that has JavaScript enabled. Possibly to ignore bots and spiders.
  • See the view count in post list page so I can always monitor which post is getting good views.

And to get the popular posts, you can simply use WP_Query with meta_query arguements

This plugin may or may not fit exactly for what you want it to do. So you may need to make some minor or major changes to suit you. Feel free to ask for help via comments.

World Flag – A WordPress Plugin

World Flag for WordPress Plugin which allows WordPress authors to embed country flags into posts or pages with ease.

With just simple shortcode the {flag country=”COUNTRY_CODE_HERE”} “Replace { and } with [ and ] and put the two letter country code in the country attribute”

I can understand, it not possible to remember all country’s two letter code, so to assist you with it, I have also added TinyMCE editor button that holds all the countries and the flag shortcode is just a click away

Yey! [flag country=”np”] Nepal

Get It Here

Shortcode TinyMCE plugin – In Action


World Flag Plugin In Action


Above flags was generated using this shortcode


Let know if i have missed  your country, so i can add it on next update.

Thanks to http://flag-sprites.com/ for providing such a wonderful Flag Sprite which is the major backbone of the plugin.

Get It Here

Featured Post – WordPress Plugin


Featured Post” – a WordPress plugin is a simple yet powerful WordPress Plugin that is easy to manage/integrate and display on your website using a little of custom query or in your widgets.

Easy To Select Featured Posts


Easy Configuration to show on your favorite sidebar position


Easy Query Post


Get It For Free Here

WordPress Easy(WPEasy) – Dreamweaver C5 Extension

WPEasy is a Dreamweaver extension that will help WordPress Theme developers to do it faster.

This is the first version of plugin. But I will be adding much more over time.

WPEasy CodeHint On Action

Download: Here

Now Supports Codehints for WordPress in Dreamweaver code view

How To Use?

  1. Download the Plugin from the link provided above
  2. Install it using Adobe Extensions Manager
    • Open from Dreamweaver itself: Got To: Help>Manage Extensions
    • Install The Extension. Hit Install Button on top, point the “easy-wp.mxp” file you downloaded earlier.
      install-dreamweaver extension
  3. After installation is complete, You would fine new menu item (labelled “EasyWP“) on your Dreamweaver usually just before “Help” menu bar

NOTE: Please request more features if you want them through the comments below.

They said Coding is fun, but making it easy is cool!

Happy WordPress Coding

Instagram Gallery – A WordPress Plugin


An awesome WordPress plugin to display your Instagram library images in your website using Shortcodes and Widget. Plugin allows the website owner to add his/her instagram images or even use hashtag to display images.

See More Into at : Here

Get It Today: http://codecanyon.net/item/instagram-gallery-wordpress-plugin/3054181

Disabling Admin Menu Bar

Its usually annoying that the theme displays so called WordPress Admin Bar on the theme when you never wanted to. In several cases, it just disrupts the theme layout. Mostly when you are a freelancer like me and your client asks “Why isn’t the body background irregular with the header image”, and you will have no option but to call them and ask them to view the website using different browser or device without logging in as admin.

But, it still not late and you can remove them with just few lines of code on your functions.php file.


add_filter('show_admin_bar', '__return_false');  

But if you are using wordpress 3.3+, then you can get that option easily by editing your profile via User>Your Profile  and un-tick “Display Toolbar when viewing website” (Though this isn’t always possible)

Its always a good idea to not to let the annoying admin-bar appear if that’s going to ruin your whole day of work.

I will soon post on how to disable admin-bar on wp-admin too.. that may be helpful.

Allowing Shortcode in sidebar widget

By default, WordPress won’t allow you to add shortcode in sidebar widget. There are several plugins that requires shortcode to be added to post, or do the hard-coding jobs to do them manually on template. And its frustrating when you have a dynamic sidebar and you want a widget that runs on shortcode.

So, a line of code added to functions.php of your theme can make a difference and you can just add shortcode like in posts.


add_filter('widget_text', 'do_shortcode');

to functions.php file of the theme and after then its all possible.

Happy Widgetizing!!