Simple jQuery Snowfall Effect

Simple jQuery Snowfall effect is the code snippet which allows user to add snowfall effect to their website. This snowfall library simple consist of JQUERY, CSS and HTML. We can simply just download this library and use it.

Steps to Download and Run Snowfall Effect Library:

  • Download this library.
  • Run Index.html in any browser and you can see the effect.

Now If, anybody wants to integrate this snowfall effect in their website, follow this steps:

  • Firstly Add JQuery to your website. if already added avoid this step.
    ( if using in wordpress no need to follow this step )

    <script src="JQUERY-URL-PATH" type="text/javascript"></script>
  • Then From the library add required script and css to the website.

    <script type="text/javascript" src="assets/script.js" ></script>
    <link rel="stylesheet" type="text/css" href="assets/style.css">
  • Now just Call Snowfall function and Enjoy the Effect :-)


You can download the Library from link below:

BuddyPress / Multisite Notification plugin similar to FaceBook

We all love how Facebook notifies its users on the notification received for various activities such as messages, comments, friend request, etc.

Notification is displayed on the Browser title tab with a number. It makes sure that user is brought back to the website to check out that notification (Trust me – From SEO point of view, it helps alot to keep user on the website).

BuddyPress core has been missing out on this important feature for a while.

FB like notification for buddypress is one such plugin which solves the purpose & gives us notification just like FaceBook in real-time. More-over, it works fine on Multi-site too.

Here are few features of the plugin listed down for you:

  • Real-time notification for BuddyPress / Multi-site
  • Notification for adding friend, receiving messages, comments, groups. In short, everything which BuddyPress covers under notification bar.
  • Works same as Facebook Notification.  (Screenshot attached)buddypress-fb-like-notification


  • BuddyPress Notification plugin updates browser window title even if user is away.

The plugin repeatedly checks for new notifications for the loggedin user and if any new notification is found, it does 2 things:

1) Updates the browser window title( e.g: ‘members|’ becomes ‘(2) members|’ ) and blinks/switches repeatedly between the old and new title

2) Updates the notification menu:

– adds new notification(if any) items to the list

– updates the existing ones(if any). E.g: from ‘You have 1 new message’ to ‘You have 2 new messages’


Hope you like the post. Comments are entertained as well :-)

Use the plugin by using the below “Download” button.

Hide specific posts/pages/cpts from guest users in WordPress

Hide pages/posts/custom post types from guest users in WordPress. The setting can be done on per page/post basis.
If you wanted to hide just a couple pages from guest users, but want it to be available for members, you can use this plugin.

  1. Download this plugin.
  2. Upload and install it via wp-admin plugin installer. Activate the plugin.
  3. A checkbox will appear on edit page screen now:
    Restrict access custom field
    If you check the checkbox, this page will not be viewable unless user is logged in. Guest users will be redirected to login page when they try to view this page.
  4. By default, this checkbox only appears for ‘pages’ and not for ‘blog posts’ or any other custom post types that your website might have. It is however very easy to add it for other post types as well. For example, if you want it for custom post type called ‘course’, you can put the following code in your theme’s functions.php file:
    add_filter( 'restrict_access_post_types', 'myprefix_restrict_access_post_types' );
    function myprefix_restrict_access_post_types( $post_types ){
    	$post_types[] = 'course';
    	return $post_types;

You can download the plugin from link below:

WordPress multisite forgot password url issue

Forgot password/Lost password link in login form on subsite in a WordPress multisite setup has an issue. The link points to main site and not to the subsite where user is actually trying to login.
If the visitor is at, forgot password link here will point to This might not be desired in some situations.

Additionally, the email sent for password reset action, also has login links to main site in network and not the subsite where user was actually trying to login.

Code below fixes these 2 issues.

Plugin Name: Subsite Lostpassword
Plugin URI:
Description: Updates URLs on susbites and in lost password request emails to point to the subsite where the lost password request started.
Version: 1.0
Author: ckchaudhary
Author URI:

 * Major part of the code is taken from

	Fixes the URL at the bottom of the login page.
function sslp_lostpassword_url($url, $redirect){	
  if( !is_multisite() )
    return $url;
	$args = array( 'action' => 'lostpassword' );
	if ( !empty($redirect) ) {
		$args['redirect_to'] = $redirect;

	$lostpassword_url = add_query_arg( $args, site_url('wp-login.php', 'login') );
	return $lostpassword_url;
add_filter("lostpassword_url", "sslp_lostpassword_url", 10, 2);

function login_load_jquery(){
	wp_enqueue_script( 'jquery' );
add_action( 'login_enqueue_scripts', 'login_load_jquery', 1 );

function wdw_sslp_lostpassword_form_target_script(){
	if( !is_multisite() )
	<script type="text/javascript">
			$('#lostpasswordform').attr( 'action', '<?php echo add_query_arg( 'action', 'lostpassword', site_url('wp-login.php', 'login') );?>' );
add_action( 'lostpassword_form', 'wdw_sslp_lostpassword_form_target_script' );
	Fixes URL in email that goes out.
function sslp_retrieve_password_message($message, $key){
  if( !is_multisite() )
    return $message;
	if ( empty( $_POST['user_login'] ) ) {
		return $message;	//error probably
	} else if ( strpos( $_POST['user_login'], '@' ) ) {
		$user_data = get_user_by( 'email', trim( $_POST['user_login'] ) );
		if ( empty( $user_data ) )
			return $message;	//another error condition, no user found
	} else {
		$login = trim($_POST['user_login']);
		$user_data = get_user_by('login', $login);
	$user_login = $user_data->user_login;
	$message = __('Someone requested that the password be reset for the following account:') . "\r\n\r\n";
	$message .= home_url( '/' ) . "\r\n\r\n";
	$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
	$message .= __('If this was a mistake, just ignore this email and nothing will happen.') . "\r\n\r\n";
	$message .= __('To reset your password, visit the following address:') . "\r\n\r\n";
	$message .= '<' . site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . ">\r\n";
	return $message;
add_filter("retrieve_password_message", "sslp_retrieve_password_message", 10, 2);

This is in the form of a wordpress plugin. Download the zip file from link below. Upload it via wordpress admin plugin installer and activate it network wide.
You can download the plugin from link below:

Custom popup with css and jQuery

To show popup we every time used jQuery( popup ) like : BJQS, FANCY BOX etc. we always include that in our websites and used it but what if don’t want to include that file and make our own custom popup.

It’s really simple you just need to follow three Steps:-

  1. Include this html in our websites any where in footer, header or body
    <div id="custom-div-display" class="custom-content-css">
         <div id="contetn-with-css">
              <a href="#" id="hide-the-content">close</a>
              <h4>custom popup</h4>
              <p>here you can show you custom content</p>
  2. Copy this code and past as it in you j Query file( it will show popup on each time you refresh you screen )
     jQuery(document).keyup(function(e) {
           if (e.keyCode == 27) jQuery("#custom-div-display").hide();
  3. Copy this css in to you style.css file:
    .custom-content-css {
     z-index: 999;
     width: 100%;
     height: 100%;
     top: 0;
     left: 0;
     display: none;
     position: fixed;
     background-color: rgba(0, 0, 0, 0.85);
     color: #aaaaaa;
     opacity: 30;
     filter: alpha(opacity = 50);
    #contetn-with-css {
     width: 50%;
     height: 50%;
     position: absolute;
     color: #000000;
     background-color: #ffffff;
     /* To align popup window at the center of screen*/
     top: 40%;
     left: 50%;
     margin-top: -100px;
     margin-left: -220px;
     border-radius: 3px;
     -moz-border-radius: 3px;
     -webkit-border-radius: 3px;
     padding: 80px;

    And now every thing is done just go an refresh you websites it will show popup every time you reload you website.