Page 2 of 4

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

Posted: Tue Apr 04, 2017 12:54 pm
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-

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

Posted: Tue Apr 04, 2017 1:48 pm
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.

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

Posted: Tue Apr 04, 2017 2:12 pm
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

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

Posted: Tue Apr 04, 2017 3:14 pm
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.

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

Posted: Tue Apr 04, 2017 3:55 pm
by Goofkop
Nope that doesn't work. But its alright. Thanks for your time!

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

Posted: Tue Apr 04, 2017 7:07 pm
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>