Skip to content

Instantly share code, notes, and snippets.

View chinmayrajyaguru's full-sized avatar
🎯
Focusing

Chinmay Rajyaguru chinmayrajyaguru

🎯
Focusing
View GitHub Profile
@chinmayrajyaguru
chinmayrajyaguru / create_wordpress_login_form_shortcode.php
Last active May 21, 2021 10:04 — forked from Njengah/create_wordpress_login_form_shortcode.php
Create Custom WordPress login form using Shortcode
// 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(
@chinmayrajyaguru
chinmayrajyaguru / wordpress-w3tc-site.conf
Created April 10, 2017 15:54 — forked from elivz/wordpress-w3tc-site.conf
Nginx configuration for WordPress with W3 Total Cache plugin. See http://elivz.com/blog/single/wordpress_with_w3tc_on_nginx/
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;