This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
# Redirect yoursite.com to www.yoursite.com | |
server_name yoursite.com; | |
rewrite ^(.*) http://www.yoursite.com$1 permanent; | |
} | |
server { | |
# Tell nginx to handle requests for the www.yoursite.com domain | |
server_name www.yoursite.com; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Step 1: Create shortcode | |
function njengah_add_login_shortcode() { | |
add_shortcode( 'jay-login-form', 'njengah_login_form_shortcode' ); | |
} | |
//Step 2: Shortcode callback | |
function njengah_login_form_shortcode() { | |
if (is_user_logged_in()) | |
return '<p>Welcome. You are logged in!</p>'; ?> | |
<div class ="njengah-login-tutorial" > | |
<?php return wp_login_form( |