updated   : May 15, 2012
we now have 588 snippets
category logout
By : , on July 28, 2011 9:00 am

Add a login link to the wp_nav_menu

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add a login link to your wp_nav_menu or if the user is already logged in a logout link.

read more
By : , on April 05, 2011 9:00 am

Display different menus for logged-in users

wordpress snippet

Adding this snippet in the location you wish to display your navigation, would show one menu to logged-in users and another when they are not logged-in.

read more
By : , on April 02, 2011 9:00 am

Disable the allow_password_reset feature

wordpress snippet

Adding this snippet to the functions.php will disable the allow_password_reset feature from the login page. When using the lost password feature after you add this snippet wordpress will display “Password reset is not allowed for this user”.

read more
By : , on December 24, 2010 4:00 pm

Extend auto logout period

wordpress snippet

Adding this PHP code to the functions.php of your wordpress theme will extend the length of time cookies are kept the example is set to 1 week. Please note the value is defined in seconds

read more
By : , on November 19, 2010 8:00 pm

Check if user is logged in

wordpress snippet

Using this PHP code in your wordpress theme will let you display alternate content to users that are logged in. You could use this to display a custom message to logged in users eg: register or welcome message for members.

read more
By : , on October 27, 2010 7:24 pm

Login / Logout

wordpress snippet

Adding this PHP code to your wordpress theme will provide users with the login and logout links.

read more