Hello Friends,

Hope you all doing well :)

I have launched my another new  “Protect WP-Admin” wordpress plugin.

“Protect WP-Admin”
  is a very help full plugin to make wordpress admin more secure. Protect WP-Admin plugin is provide the options for change the wp-admin url and make the admin login page private(spam user can’t access the admin login page).





Click here to download plugin


Hello Friends!

If you want to add a new columns with custom meta fields on list page for any post type then you can do it using the wordpress hooks.

Using hooks you have no need to edit in wordpress core file, you can do all by edit in theme function.php file.

add_filter( 'manage_edit-news_columns', 'news_edit_columns_title' ); 
//Here news is a custom post type , you can update its value according to post type.
/* We are taking zipcode field as custom filed */
function news_edit_columns_title( $columns ) {
 $columns = array(
 'cb' => '<input type="checkbox" />',
 'title' => __( 'Title', 'Theme_Name' ),
 'zipcode' => __( 'Zipcodes', 'Theme_Name' ),
 'date' => __( 'Date', 'Theme_Name' ),
 return $columns;

/* Set the zipcode field value to that columns */

add_action( 'manage_posts_custom_column', 'add_news_columns_value' );
function add_news_columns_value( $column ) {
$custom_fields = get_post_custom();

 switch ( $column ) {
 case 'zipcode' :
 echo get_post_meta( get_the_ID(), 'custom_zipcode_value_key',true );
//here custom_zipcode_value_key is the meta key for zipcode

You can visit on wordpress official site for know more about manage_posts_custom_column & manage_edit-post_type_columns functions.



Hope you all will be enjoy my code!

Hello Friends!

Hope you all are doing well! :)

If you want to check that your website is browsing in mobile phone and desktop OR want to add the any condition for mobile/desktop then use code given below :

function is_mobile_browser() {
 $is_mobile = (bool) preg_match( '#\b(ip(hone|od)|android\b.+\bmobile|opera m(ob|in)i|windows (phone|ce)|blackberry' . '|s(ymbian|eries60|amsung)|p(alm|rofile/midp|laystation portable)|nokia|fennec|htc[\-_]' . '|up\.browser|[1-4][0-9]{2}x[1-4][0-9]{2})\b#i', $_SERVER['HTTP_USER_AGENT'] );

 return $is_mobile;

 echo "Site is running on Mobile";
 echo "Site is running on Desktop";

Enjoy Code!

Hello Friends!

Hope you all doing well :)

I have launched my another new  “WP Social Buttons” wordpress plugin.

“WP Social Buttons”
is the very simple plugin for add to floating social buttons on your site.


“wp-social-buttons” is the very simple plugin for add to social buttons on your site(floating sidebar). Using this plugin you can easly share your website with your firends on Facebook,Twitter,Linkedin,Pinterest,Google+. There are not added any external JS files in this plugin so it’s does not effect on your site speed as well.


  • Floating Sidebar
  • Options to show/hide the specific social buttons
  • Options for define the postion(Left/Right) of floating sidebar


Download This Plugin

Hope you all will be enjoy my this plugin! :)

Enjoy My Plugin

Hello friends!

Hope you all are doing well!

Last time i was launched my “Custom Share Buttons” wordpress plugin http://raghunathgurjar.wordpress.com/2014/07/17/launched-custom-share-buttons-version-1-1/ version 1.1

Now i have launched new version 1.3, So go here http://wordpress.org/plugins/custom-share-buttons-with-floating-sidebar/ for download the new version

Change Log 1.2 & 1.3

  • Added an options for add the social share buttons on bottom of the content on every post/pages
  • Fixed button image gap issue for right position
  • Added new option for set the delay time to publish the share butttons


Please do not forget to leave your feedback about my plugin on wordpress site!

Enjoy! :)

Hello Friends!

Hope you all are doing well.

If you want to disable the theme and plugin file editor from admin then don’t worry, i am here only for you :)

add the give code below  in wp-config file.

Basically this is very important for make your site more secure because generally most of people have used their UN-secure admin password , they have used password like “admin123″, “admin”,”admin@123″ and site hacker can easily your hack your admin password.

After hack the admin access he can changes anything in theme files  as well plugin files also and after done anything by hacker in files your site will be down. So don’t waste your time just add this code in your wp-config.php files

define( 'DISALLOW_FILE_EDIT', true );

Enjoy Code!

Hello Friends!

Hope you are doing well :)

I am here going to tell you some useful script for manage .htaccess file of your website.

  1. First of all you have need to check the  RewriteEngine is “on” or not in your htaccess file. if not then add the given code in top of the file
    RewriteEngine on
  2. How redirect site form NON-WWW to WWW url using htaccess?
    ##non-www to www
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
  3. How redirect site from WWW to NON-WWW url using htaccess?
    pre>## www to non-www
    RewriteCond %{HTTP_HOST} ^www\. [NC]
    RewriteRule ^(.*)$ %{HTTP_HOST}$1 [C]
    RewriteRule ^www\.(.*)$ http://$1 [L,R=301]
  4. How create a single line code for read “.php” files as “.html using htaccess”?
    ## Add rewrite rule for call ".php" pages as ".html" pages
    # Example about-us.php file will be read as about-us.html
    Options +Indexes
    Options +FollowSymlinks
    RewriteRule ^([^.]+)\.html$ $1.php [L]
  5. How remove the index.php OR index.html from the site url using htaccess
    RewriteRule ^(.*)index\.(htm|html|php)$ http://%{HTTP_HOST}/$1 [R=301,L]
  6. How redirect Old Site to new New Site?
      RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
      RewriteCond %{HTTP_HOST} ^www.olddomain.com$
      RewriteRule (.*)$ http://www.newdomain.com/$1 [R=301,L]

Enjoy Code!

Hello Friends!

Hope you all are doing well :)

In my last post i have explain to you  all my friends a way for  “add a new “Custom Fields” on taxonomy/category page


Now i am going to explain you for show the newly added custom field and its value on “Category List” page


For do that you have need only to use my code and follow steps give below:

Steps.1 – First of all you have need to add given code in your theme function file

//For add the new fields 
function my_column_header($columns)
    $columns['customval'] = __('Custom Field');
    return $columns;
add_filter('manage_edit-category_columns', 'my_column_header', 10, 2);

After add this code in your theme function file you will be see the custom fields title


Step.2 – Now you have need to add the given code in your theme function for get the custom field value

//Get the custom field value
function my_column_value($empty = '', $custom_column, $term_id)
    //Category custom field
   $term_meta = get_option( "taxonomy_term_$term_id" ); 
   $CustomValue=$term_meta['wpsc_product_category_catsortby'] ? $term_meta['category_customval'] : '0';
 return $CustomValue;
add_filter('manage_category_custom_column', 'my_column_value', 10, 3);


That’s All :)

Enjoy Code! | Raghunath Blog