wordpress plugin nextgen gallery review

we written wordpress plugin nextgen gallery review. NextGEN Gallery most downloaded gallery plugin which makes us to organize your images and galleries.

NextGEN Gallery is a most downloaded wordpress gallery plugin which makes us to manage and organize your images and galleries. There are many wordpress gallery and sideshow plugins but nextgen gallery is most used and popular in wordpress world. In every second website we need to show the gallery or sideshow. For showing gallery or sideshow, Nextgen gallery is quickest and simple solution. Every wp designers and developers first choice for gallery or sideshow is Nextgen gallery plugin.

wordpress plugin nextgen gallery review

NextGEN Gallery

wordpress plugin nextgen gallery review  by purabtech.in
wordpress plugin nextgen gallery review

NextGEN Gallery is the most popular WordPress gallery plugin, and one of the most popular WordPress plugins of all time, with over 7.5 million downloads.

It provides a powerful engine for uploading and managing galleries of images, with the ability to batch upload, import meta data, add/delete/rearrange/sort images, edit thumbnails, group galleries into albums, and more. It also provides two front-end display styles (sideshows and thumbnail galleries), both of which come with a wide array of options for controlling size, style, timing, transitions, controls, lightbox effects, and more.

Review:

Pros:

  • Very easy to install in wordpress and using Nextgen gallery is simple.
  • Simple and easy gallery management tools – It has simple image upload and gallery creation interface.
  • It works with custom post type very smoothly
  • Support of short codes so you can easily integrate anywhere in wp site
  • Easily create sideshow through NextGen gallery
  • Many types of effects and JS support using multiple plugins
  • There are many wordpress plugins which can adds effects to gallery or sideshow.
  • If you are wordpress developer then you can easily customize the plugin and add the new effect.
  • We can use Lightbox Plus, FancyBox and Lightbox-type wordpress plugins for gallery and sideshow.

Drawbacks:

  • We cannot include videos in gallery or youtube video in gallery
  • After upgrade of Nextgen gallery you must need to take backup of whole system because many times it will broke your website.
  • WordPress new version release issue – After new wordpress release, there is no guarantee to it will work in Nextgen gallery.
  • It consumes too much processor and so many database queries are fired on server.
  • Poor logic programming, poor user interface, slow user interface, lot’s of queries are just some of the many bugs and bad design of application
  • Performance is low it there are too many requests
  • No caching support.
  • No SEO support

Comments:

If you have high traffic website then do not use the nextgen gallery plugin. If you have low traffic or any organization website then you should go for Nextgen gallery plugin.

There are so many supported plugins for Nextgen gallery, so you can add multiple effects using this plugin.

I used Next Gen gallery plugin for many of my sites. But there is always issue with up-gradation.

But SEO wise this plugin is not so nice.

change author url without wordpress plugin

wp user want to use other url for admin user. You can easily change using wordpress hook. you can change author url in wordpress without wordpress plugin. using code you can do this. wordpress developer can use this code.

change author url without wordpress plugin

There is default username in wordpress. admin is default username in wordpress but many times user want to use other wordpress user url for admin user. You can easily do this by using following wordpress hook.

You just need to place following code in functions.php file which is your theme folder.

add_action('init', 'change_wordpress_author_url');
function change_wordpress_author_url() {
global $wp_rewrite;
$author_slug = 'new_author_url';
$wp_rewrite->author_base = $author_slug;
}

You need to choose your author url. Just replace the “new_author_url” word and put in functions.php file.

change author url without wordpress plugin
how to change the author url in wordpress without wordpress plugin

how to check custom post type in wordpress

wordpress tutorial, how to check custom post type in wordpress. Many we want to execute some code on custom post type or want to execute code on post. Many we want to execute some code on custom post type or some times we want to execute code on normal pages or post.

how to check custom post type in wordpress

So here is solution. You just need to just add following code into your functions.php file which you can find in your wordpress theme folder.

function check_custom_post_type() {
global $wp_query;

$post_types = get_post_types(array('public'   => true,'_builtin' => false),'names','and');

foreach ($post_types  as $post_type ) {
if (get_post_type($post_type->ID) == get_post_type($wp_query->post->ID)) {
return true;
} else {
return false;
}
}
}

After this you can use following function in any wordpress file. For example you can use this method in single.php file.

if (check_custom_post_type()) {
//Current post is a custom post type
}
how to check custom post type in wordpress
wordpress tutorial, how to check custom post type in wordpress. Many we want to execute some code on custom post type or want to execute code on post.

How to wordpress secure file upload using apache rules

WordPress tutorial, How to wordpress secure file upload using apache rules, Here we given apache rule for secure your wordpress file upload functionality.

How to wordpress secure file upload using apache rules

Website security is most important point of any website. In wordpress we need to give 777 permission to wp-content/uploads folder. Some time we don’t want to give the 777 (read, write and execute) permission to folder due to security reason but wordpress do not allow you to upload images or media files to uploads folder.

Tip: Do not give 777 permission to wp-content/uploads folder. In stead change user ownership to apache folder.

Security

What you can do is. You can restrict other file types to upload in uploads folder using simple apache rule. following code you can use in .htaccess file.


	Order Allow,Deny
	Deny from all

<FilesMatch ".(jpg|jpeg|jpe|gif|png|tif|tiff)$">
	Order Deny,Allow
	Allow from all

Using above code you can secure your uploads folder and only selected files can be pushed into uploads folder.

How to wordpress secure file upload using apache rules
How to wordpress secure file upload using apache rules

how disable comments on wordpress pages

We strongly recommend to disable comments on wordpress pages. Many people want to disable the page comments. Using our code disable comments for your pages. Many people want to disable the page comments. Using simple code you can easily disable the comments for your pages by default.

how disable comments on wordpress pages

Here I written simple code. Using following code you can disable the comments for your wordpress pages. you need to just put following code into your functions.php file.

<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php

function disable_comments( $posts ) {
 if ( is_page()) {
 $posts[0]->comment_status = 'disabled';
 $posts[0]->ping_status = 'disabled';
 }
return $posts;
}
add_filter( 'the_posts', 'disable_comments' );
?>
how disable comments on wordpress pages
how disable comments on wordpress pages

how to get current user information in wordpress

In wordpress current user means, Who written current post or article.In this article we are going show you, how to get current user information in wordpress. Following methods are useful when user are logged in to wordpress CMS.

You can print the user information using following information. Retrieves the information pertaining to the currently logged in user, and places it in the global variable $current_user.

how to get current user information in wordpress

You can put following code in your theme folder.

<?php 

global $current_user;
 get_currentuserinfo();
 echo 'Username: ' . $current_user->user_login . "\n";
 echo 'User email: ' . $current_user->user_email . "\n";
 echo 'User first name: ' . $current_user->user_firstname . "\n";
 echo 'User last name: ' . $current_user->user_lastname . "\n";
 echo 'User display name: ' . $current_user->display_name . "\n";
 echo 'User ID: ' . $current_user->ID . "\n";
?>

Or you can use following code for showing the current user information

<?php&nbsp;
wp_get_current_user();&nbsp;
?>  

<?php
$user_info = get_userdata(1);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo 'Username: ' . $user_info->user_login . "\n";
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo 'User roles: ' . implode(', ', $user_info->roles) . "\n";
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo 'User ID: ' . $user_info->ID . "\n";
?>

For more detailed information you can visit following link:
http://codex.wordpress.org/Function_Reference/get_userdata

how to get current user information in wordpress
how to get current user information in wordpress

How to create custom shortcode for wordpress site

There are many wordpress plugins which using the shortcode. But you easily create custom shortcode for wordpress site. there is no need of external plugin.

custom shortcode for wordpress

Since Version 2.5 WordPress support so called Shortcodes. They have been introduced for creating macros to be use in a posts content. Many people looking for how to create the shortcode in wordpress using theme. It is very easy to build shortcode in wordpress. I given very simple code sample for creating the custom shortcode.

For more information visit following page.

For creating the custom shortcodes you need add following method in functions.php file which is located in your theme folder.


function myshortcode(){
 return '<img src="http://images.purabtech.in/How-to-make-empty-the-wordpress-trash-automatically.png">';
}
add_shortcode('myshortcode', 'myshortcode');

custom shortcode for wordpress
custom shortcode for wordpress

you can change the return text or shortcode name aslo.

wordpress media settings full url path to files removed

As per changes of wordpress 3.5 “Full url path to files” which is media library setting is removed from wrodpress settings. If people want to set easily the upload path or subdomain for uploaded images they are not able set it very easily.

wordpress media settings full url path to files removed

wordpress media settings full url path to files removed
wordpress media settings full url path to files removed

If you want to set the subdomain for images in wordpress 3.5 then use following filter code in your functions.php file.


add_filter( 'pre_option_upload_url_path', 'subdomain_upload_url' );

function subdomain_upload_url()
{
 return 'http://subdomain.purabtech.in/uploads';
}

For more information you can see following URL

http://codex.wordpress.org/Editing_wp-config.php#Moving_uploads_folder

If still you want old settings then you can use following wordpress plugin:

WP Original Media Path

The new version of WordPress 3.5 has changed the media page, removing the two fields to define the location and the sub-field of media. There exists a constant wp-config.php, but it does not include sub-domains. This plug-in is designed for installations virgin WordPress. Once activated, the plugin will add two values ​​in the database, you modify later.

Hope your problem will be solved.

Display the authors in dropdown menu using wp_dropdown_users – Hook/Filter

One of my client faced issue with Autor drop down which is in Admin section.

Display the authors in dropdown menu using hooks.

While creating the New post there was problem with the Author field. There are hundreds of irrelevant selections (users) and it’s difficult to select the right one.

WordPress is by default showing all the users in author drop down. I don’t want to show the other users in author drop down.

Display the authors in a dropdown menu
Hook/Filter – In wordpress Admin -Add new Post section -Display the authors in a dropdown menu using wp_dropdown_users One of my client faced issue with Autor drop down which is in Admin section. Display the authors in a dropdown menu using hooks

I searched for wp_dropdown_users hook or filter. But I did not found any proper solution.

Following articles are found helpful to me.
http://wordpress.org/support/topic/filter-for-post-quick-edit-author-drop-down
http://codex.wordpress.org/Function_Reference/wp_dropdown_users

Using that code I modified the code and I am able to fix the issue. You can put following code in to functions.php file.

 /*
 * Hook for showing Admin and Author in Add new Post - Admin section dropdown menu
 */
function wpapi_override_wp_dropdown_users($output) {
    global $post, $user_ID;
    //get the Admin-role users IDs
    $admins = getUsersWithRole('admin');
    //get the author-role users IDs
    $authors = getUsersWithRole('author');
    //merge the array
    $result = array_merge($admins, $authors);

    //array converted into comma seprated string
    $authorsall = implode(",", $result);

    // return if this isn't the theme author override dropdown
    if (!preg_match('/post_author_override/', $output))
        return $output;

    // return if we've already replaced the list (end recursion)
    if (preg_match('/post_author_override_replaced/', $output))
        return $output;

    // replacement call to wp_dropdown_users
    $output = wp_dropdown_users(array(
        'echo' => 0,
        'name' => 'post_author_override_replaced',
        'selected' => empty($post->ID) ? $user_ID : $post->post_author,
        'include_selected' => true,
        'include' => $authorsall
    ));

    // put the original name back
    $output = preg_replace('/post_author_override_replaced/', 'post_author_override', $output);

    return $output;
}

add_filter('wp_dropdown_users', 'wpapi_override_wp_dropdown_users');

/*
 * Find User IDs by Role
 */

function getUsersWithRole($role) {
    $wp_user_search = new WP_User_Search($usersearch, $userspage, $role);
    return $wp_user_search->get_results();
}

Using above code, you can load multiple role users in author drop down.

how to disable cron job in wordpress

Before every post visit wordpress cron is running and taking too much bandwidth.  So we given trick and code to disable cron job in wordpress, which will disable wordpress cronjob.  if you have a lot of visitors it can be a problem. I am convinced this is the reason why my admin has become glacially slow and my site often crashes when making edits.

how to disable cron job in wordpress

Disable the wp-cron.php

you need to add the code to your wp-config.php file.


define('DISABLE_WP_CRON', 'true');

If you have shared hosting then add the following cron job


php -q wp-cron.php

If you have your own server then you need to add the cronjob in crontab


* */1 * * *wget https://purabtech.in/wp-cron.php

how to disable cron job in wordpress
how to disable cron job in wordpress