Solved

wordpress custom login form

Posted on 2014-11-23
6
242 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
ID: 40460590
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
ID: 40460599
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
ID: 40460601
You need to learn how to develop wordpress plugin and then develop your own.
http://codex.wordpress.org/Writing_a_Plugin
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

by:derrida
ID: 40460610
so no way to do it like a home page?
0
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 250 total points
ID: 40460615
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
ID: 40460620
thanks both
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This article discusses four methods for overlaying images in a container on a web page
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
The viewer will learn how to count occurrences of each item in an array.

820 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