Lightning Rank - Private Blog Network

  • Home
  • Done 4 You PBN Service
  • Other Services
    • Amazon Associate Audit
    • Editorial Links
    • Buy Expired Domains
  • Contact
    • Affiliates

Create A WordPress Login Form Shortcode For Your Blog

November 20, 2015 By Jon Gillham Leave a Comment

This neat little WordPress code tutorial will show you how to easily create a WordPress Login Form Shortcode using theĀ wp_login_form() function that can then be placed inside any post or page of your WordPress blog. You will be required to edit a file during this tutorial we recommend that you use a good quality text editor like PSPad or similar when editing any PHP files.

Copy and Paste the code below into your themes functions.php file.

function devpress_login_form_shortcode() {
if ( is_user_logged_in() )
return '';

return wp_login_form( array( 'echo' => false ) );
}

function devpress_add_shortcodes() {
add_shortcode( 'devpress-login-form', 'devpress_login_form_shortcode' );
}

add_action( 'init', 'devpress_add_shortcodes' );

Now to display the login form usuing a shortcode anywhere in your post or page content simply place the shortcode below into the post or pages editor screen where you would like the login form to display.

[devpress-login-form]

You should now have the ability to add a WordPress login form easily to any page or post.

Filed Under: Wordpress Tutorials Tagged With: wordpress hack, wordpress login, wordpress shortcode, wordpress tutorial

Leave a Reply Cancel reply

You must be logged in to post a comment.

Recent Posts

  • What It takes to get to #1 in Google
  • Private Blog Network Building Service in 2016 – Is It Still Worth The Risk?
  • UpThemes Scale Back On Theme Options Within Their WordPress Themes
  • Create A WordPress Login Form Shortcode For Your Blog
  • WooThemes Back Online After Malicious Hack & Further DDoS Attack

Our Team

Jon Gillham

Father, Husband and mechanical engineer. Jon has the easy job he builds and tests systems that Kelley, Hmd and their teams execute!
Ahmed Ali

Ahmed is the man that makes sure everything runs smoothly. A true jack of all trades he makes sure each site is built to our high standards!

Copyright © 2022 . Experts at Harnessing the Power of Expired Domains to Help You Outrank Your Competition