Written on April 07, 2013 at 03:04 pm by admin

Using WordPress 3.5+ Media Uploader in Theme & Plugins

It was a good feeling when there came a solution to use WordPress Old Uploader in themes and plugin using thickbox.

It was something like: (I DON’T LIKE THIS!!)

But now, its time to say goodbye after the introduction of new Uploader in WordPress, and it looks more than just awesome. And the most special of this is new frame uploader is that you can get the actual media ID(including url of different sizes), not the media URL to use to get different image size using WordPress inbuilt image resizers and different image sized you defined from add_image_size function.

upload-demo

First things first:

Enqueue the Javascript Files we need(I am doing it for admin pages for now):

Creating HTML Components

Create an admin page where you want to have a button that will open the new WP 3.5 uploader. A small chunk of my html is:

Now followed by the JavaScript:

NOTE: If your custom admin page isn’t using any kind of media editor or wordpress uploaders, then dont’ forget to call the fucntion wp_enqueue_media(); somewhere in your custom page. (It actually builds some html templates for frames and blah blah!!)

Download The Demo plugin here

Written on March 24, 2013 at 06:03 pm by admin

Awesome Gallery Plugins to have on WordPress Sites

LayerSlider 3D Responsive WordPress Slider Plugin

LayerSlider 3D Responsive WordPress Slider Plugin

Demo - Purchase

RoyalSlider – Touch Content Slider for WordPress

RoyalSlider - Touch Content Slider for WordPress

Demo - Purchase

Slider Revolution Responsive WordPress Plugin

Slider Revolution Responsive WordPress Plugin

Demo - Purchase

WPSequencer – CSS3 slider constructor for WordPress

WPSequencer - CSS3 slider constructor for WordPress

Demo - Purchase

Written on March 19, 2013 at 05:03 pm by admin

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! Nepal 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

Written on September 15, 2012 at 06:09 pm by admin

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:

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.

Written on at 05:09 pm by admin

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

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

Happy Widgetizing!!