Inspiration For Creative Minds
Home » Labs » How to check if a user is logged in on WordPress blog  

Filed under Labs

Below code will check if a user is logged in, this code can use when you want to show a custom message (Eg: welcome MSG) to users who logged in.

 
	<?php
	  if (is_user_logged_in()) {
				  /* Show welcome MSG here */
		  }else{
				  /* no user is not logged in */
		  }
	?>
It's only fair to share...Share on Google+Tweet about this on TwitterShare on Facebook
Labs

Posts you may like: