Tag Archives: Wordpress

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

screenshot-1

World Flag Plugin In Action

screenshot-2

Above flags was generated using this shortcode

screenshot-3

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

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:

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

add_filter('widget_text', 'do_shortcode');

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

Happy Widgetizing!!