WordPress – Check user has specific role

Sometimes you need to check WordPress user role to grant permission to access certain area of a WordPress Website. WordPress doesn’t have a function for checking the user role. Following piece of code lets to you check user has specific role in WordPress.
Read more

Fix : WordPress asking FTP credentials to install plugins on localhost – Ubuntu/Mac

WordPress may ask for FTP credentials to install plugins or update theme or plugins on localhost host. Mostly in Linux based operating system, like Linux, Ubuntu.This issue may be arise in Mac OS too. And you need to enter FTP credentials each and every time to proceed with your install/update.
Read more

Retrieve WP login URL changed using All in One WP Security plugin

Looking for an easy method? Created a php file to retrieve AIOWPS login URL. You can find downloadable link at the bottom of the article. 🙂

Few months ago I had changed my WordPress login URL using All in One WP Security(AIOWPS) plugin. Unfortunately i forgot new login URL. I recovered the login URL from plugin configuration data that stored in options table.

Here am explaining how to Retrieve WP login URL changed using All in One WP Security plugin(AIOWPS).

Follow the steps.

1. Login to your phpmyadmin.

2. Go to wp_options table.
Read more

WordPress 3.5 media upload customized form

WordPress 3.5 media upload in custom pages, custom functions. Use WordPress media upload in custom plugins. WordPress custom media upload example

You can use WordPress image upolader in your theme, theme option or plugin.  You can find out detail from this post. You can download demo files from the link placed below.

Follow the steps mentioned here

Include following jquery in your page

<script type=”text/javascript” src=””></script> <script type=”application/javascript”>
var _custom_media = true;
_orig_send_attachment =;
$(‘#btn_upload’).click(function(e) {
var send_attachment_bkp =;
_custom_media = true; = function(props, attachment){
if ( _custom_media ) {
} else {
return _orig_send_attachment.apply( this, [props, attachment] ); }; }; return false; }); });

Enable following wordpress jqueries

<?php if(function_exists( ‘wp_enqueue_media’ )){
wp_enqueue_script(‘thickbox’); }?>

Create elements for uploading
<input type=”text” name=”txt_imageurl” id=”txt_imageurl” />
<input type=”button” class=”button” name=”btn_upload” id=”btn_upload” value=”Upload” />

Click here to download demo.

wordpress media uploader in plugin
custom media uploader wordpress
wordpress media uploader front end
wordpress image upload frontend
wordpress frontend ajax image upload
upload image in wordpress plugin code