← WordPress

Login

Lida 2336 vezes

Offline

flock 
Membro
Mensagens 508 Gostos 0
Feedback +7

Troféus totais: 22
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 500 Posts 100 Posts

Alguém tem ou sabe um código que permite fazer login como registo num site em wordpress. De perferencia na Horizontal
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Não percebi... :S
Offline

flock 
Membro
Mensagens 508 Gostos 0
Feedback +7

Troféus totais: 22
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 500 Posts 100 Posts

Queria adicionar uma caixa de login e de registo num site em wordpress.
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Ah :lol:


Login:
Código: [Seleccione]
<?php
get_currentuserinfo
() ;
global 
$user_level;
if (
$user_level0) { wp_loginout(); } else { 
?>

<form name="loginform" id="loginform" action="wp-login.php" method="post">
    <input type="text" name="log" id="user_login" class="text input" value="<?php echo attribute_escape(stripslashes($user_login)); ?>" size="20" />
    <input type="password" name="pwd" id="user_pass" class="text input" value="" size="20" /><?php do_action('login_form'); ?>
    <input name="rememberme" type="hidden" id="rememberme" value="forever" />
    <input type="submit" name="wp-submit" id="wp-submit" class="submit" value="<?php _e('Login'); ?> &raquo;" />
</form>
<?php ?>
Offline

Jerson 
Elite
Mensagens 2401 Gostos 0
Troféus totais: 28
Trófeus: (Ver todos)
Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2

Existem plugins que fazem isso, acho que será mais fácil dessa forma. Deves procurar na página oficial de plugins para wordpress, tens lá muitos.
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Registar:
Código: [Seleccione]
<form name="registerform" id="registerform" action="wp-login.php?action=register" method="post">
    <input type="text" name="user_login" id="user_login" class="text input" value="<?php echo attribute_escape(stripslashes($user_login)); ?>" size="20" />
    <input type="text" name="user_email" id="user_email" class="text input" value="" size="20" /><?php do_action('login_form'); ?>
    <input type="submit" name="wp-submit" id="wp-submit" class="submit" value="<?php _e('Register'); ?>" />
</form>

Existem plugins que fazem isso, acho que será mais fácil dessa forma. Deves procurar na página oficial de plugins para wordpress, tens lá muitos.

Não precisa de plugins.
Offline

flock 
Membro
Mensagens 508 Gostos 0
Feedback +7

Troféus totais: 22
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 500 Posts 100 Posts

Tanto um como o outro aparece assim
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Isso é PHP, e tem de ser no tema do wordpress. Não pode ser fora.
Offline

flock 
Membro
Mensagens 508 Gostos 0
Feedback +7

Troféus totais: 22
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 500 Posts 100 Posts

Ha ok vou experimentar
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Podes apagar o PHP que tem se quiseres...

Login:
Código: [Seleccione]
<form name="loginform" id="loginform" action="http://site.com/wp-login.php" method="post">
    <input type="text" name="log" id="user_login" class="text input" value="" size="20" />
    <input type="password" name="pwd" id="user_pass" class="text input" value="" size="20" />
    <input name="rememberme" type="hidden" id="rememberme" value="forever" />
    <input type="submit" name="wp-submit" id="wp-submit" class="submit" value="Login" />
</form>

Registar:
Código: [Seleccione]
<form name="registerform" id="registerform" action="http://site.com/wp-login.php?action=register" method="post">
    <input type="text" name="user_login" id="user_login" class="text input" value="" size="20" />
    <input type="text" name="user_email" id="user_email" class="text input" value="" size="20" />
    <input type="submit" name="wp-submit" id="wp-submit" class="submit" value="Registar" />
</form>
Offline

flock 
Membro
Mensagens 508 Gostos 0
Feedback +7

Troféus totais: 22
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 500 Posts 100 Posts

obrigada