Button in place of Text for Logout on Login Widget

User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Button in place of Text for Logout on Login Widget

Post by axew3 »

p.s little confused by what you mean, because looking into your pics it seem you are correctly logged out on both, except the message that inform the user that he has been logged out? There is login form on page, so an user can assume that if have click on logout, and a form for user/pass display, well, probably will imagine have been logout?
By the way, with both above code you should be able to fix-
Goofkop
User www
User www
Posts: 63
Joined: Sun Feb 26, 2017 8:33 am

Re: Button in place of Text for Logout on Login Widget

Post by Goofkop »

axew3 wrote: Tue Apr 04, 2017 12:54 pm p.s little confused by what you mean, because looking into your pics it seem you are correctly logged out on both, except the message that inform the user that he has been logged out? There is login form on page, so an user can assume that if have click on logout, and a form for user/pass display, well, probably will imagine have been logout?
By the way, with both above code you should be able to fix-
Yes thats right. But when i click on back to bakkersbaas (name of my website) i am sill logged in.
Goofkop
User www
User www
Posts: 63
Joined: Sun Feb 26, 2017 8:33 am

Re: Button in place of Text for Logout on Login Widget

Post by Goofkop »

<input type="button" onclick="location.href='<?php echo wp_logout_url(); ?>';" value="Logout" />

This code works but the button isn't the same as the login and has no mouse over effect. The other code does this but didn't logout.

http://imgur.com/a/ay9o6
http://imgur.com/a/KZtZh
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Button in place of Text for Logout on Login Widget

Post by axew3 »

so maybe your solution is this:

Code: Select all

 <form action="">
<input type="button" onclick="location.href='<?php echo wp_logout_url(); ?>'" value="<?php echo __('Logout' , 'wp-w3all-phpbb-integration' ); ?>" />
</form> 
you can look also for css style to achieve the result.
Goofkop
User www
User www
Posts: 63
Joined: Sun Feb 26, 2017 8:33 am

Re: Button in place of Text for Logout on Login Widget

Post by Goofkop »

Nope that doesn't work. But its alright. Thanks for your time!
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Button in place of Text for Logout on Login Widget

Post by axew3 »

probably because the last code was containing a wrong char inside:

Code: Select all

 <form action="">
<input type="button" onclick="location.href='<?php echo wp_logout_url(); ?>'" value="<?php echo __('Logout' , 'wp-w3all-phpbb-integration' ); ?>" />
</form> 
Post Reply