Solved

wordpress custom login form

Posted on 2014-11-23
6
229 Views
Last Modified: 2014-11-23
hi
is there a way to make a custom login and registration form to wordpress? like you just create an home page?
i want to use bootstrap the html of the form
0
Comment
Question by:derrida
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:artsec
Comment Utility
There is a plugin for custom login page which you can use with wordpress:
https://wordpress.org/plugins/custom-login/

And more here: http://www.wpexplorer.com/best-login-plugins-wordpress/
0
 
LVL 1

Author Comment

by:derrida
Comment Utility
hi
yes i know about plugins.
i want to learn and do it myself.
0
 
LVL 4

Assisted Solution

by:artsec
artsec earned 250 total points
Comment Utility
You need to learn how to develop wordpress plugin and then develop your own.
http://codex.wordpress.org/Writing_a_Plugin
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 1

Author Comment

by:derrida
Comment Utility
so no way to do it like a home page?
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 250 total points
Comment Utility
There's an article that shows the general design pattern for PHP client authentication (often called a "login form").
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_2391-PHP-login-logout-and-easy-access-control.html

But that said, the advice from artsec has you headed in the right direction.  WordPress has its own way of doing things, and in my experience "the WordPress way" is more important to success with WordPress than "the PHP way."  The simplest WordPress Plugin is probably "Hello Dolly."  It's well documented and shows how to get a plugin to work.  Your choice of "hooks" will determine what pages are password protected.  The WP add_action() function tells where to put the hooks for your login programming.

<?php
/**
 * @package Hello_Dolly
 * @version 1.6
 */
/*
Plugin Name: Hello Dolly
Plugin URI: http://wordpress.org/plugins/hello-dolly/
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
Author: Matt Mullenweg
Version: 1.6
Author URI: http://ma.tt/
*/

function hello_dolly_get_lyric() {
	/** These are the lyrics to Hello Dolly */
	$lyrics = "Hello, Dolly
Well, hello, Dolly
It's so nice to have you back where you belong
You're lookin' swell, Dolly
I can tell, Dolly
You're still glowin', you're still crowin'
You're still goin' strong
We feel the room swayin'
While the band's playin'
One of your old favourite songs from way back when
So, take her wrap, fellas
Find her an empty lap, fellas
Dolly'll never go away again
Hello, Dolly
Well, hello, Dolly
It's so nice to have you back where you belong
You're lookin' swell, Dolly
I can tell, Dolly
You're still glowin', you're still crowin'
You're still goin' strong
We feel the room swayin'
While the band's playin'
One of your old favourite songs from way back when
Golly, gee, fellas
Find her a vacant knee, fellas
Dolly'll never go away
Dolly'll never go away
Dolly'll never go away again";

	// Here we split it into lines
	$lyrics = explode( "\n", $lyrics );

	// And then randomly choose a line
	return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] );
}

// This just echoes the chosen line, we'll position it later
function hello_dolly() {
	$chosen = hello_dolly_get_lyric();
	echo "<p id='dolly'>$chosen</p>";
}

// Now we set that function up to execute when the admin_notices action is called
add_action( 'admin_notices', 'hello_dolly' );

// We need some CSS to position the paragraph
function dolly_css() {
	// This makes sure that the positioning is also good for right-to-left languages
	$x = is_rtl() ? 'left' : 'right';

	echo "
	<style type='text/css'>
	#dolly {
		float: $x;
		padding-$x: 15px;
		padding-top: 5px;		
		margin: 0;
		font-size: 11px;
	}
	</style>
	";
}

add_action( 'admin_head', 'dolly_css' );

?>

Open in new window

0
 
LVL 1

Author Closing Comment

by:derrida
Comment Utility
thanks both
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article discusses how to create an extensible mechanism for linked drop downs.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now