Button in place of Text for Logout on Login Widget

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

If you wish to attach one or more files enter the details below.

Maximum filesize per attachment: 1 MiB.

Expand view Topic review: Button in place of Text for Logout on Login Widget

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

by Goofkop » Wed Apr 12, 2017 6:46 pm

The only thing i really want is that my login widget and recent forum messages widget has the same lettertype, font like my wordpress theme last messages widget.

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

by axew3 » Mon Apr 10, 2017 9:17 am

do not know what's noob but ok :)
I will do a stunning theme as i can .... ;)

/wp-content/themes/Newspaper/style.css
This is the css style applied to your theme. I see that to all input elements the style is in same way without any class that need to be applied to the element (except if you need to space, padding, or change in another way it for some reason).
So or you add a style class into your theme file css style, and you apply this to your button, or leave as is, that is the default that come out in your theme.
For instance, if you would like to space the button with more margin or padding for example, you can do this inline or with css style.
The inline version if applied take precedence over any other style applied.
inline example:

Code: Select all

<input style="padding:10px;border:1px;margin:5px" type="button" onclick="location.href='<?php echo wp_logout_url(); ?>';" value="Logout" />
css file class example:
into your css file put something like this:
.mynicenameclass{
padding:8px;
margin:5px;
}

and into element on page to apply the class style will be:

Code: Select all

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

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

by Goofkop » Sun Apr 09, 2017 4:20 pm

This sounds maybe like a noob haha.

But what i have to fill in "your class here"

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

by axew3 » Sun Apr 09, 2017 1:01 pm

Yes thats right. But when i click on back to bakkersbaas (name of my website) i am sill logged in.
this should be cache behavior because i guess, if you after click on any link you'll be result correctly logged out. If you click back button on browser, thing that may not commonly happen to an user, you can appear as logged, because cache display the old html on page, but you are not logged, if you follow to click any link, you result as logged out. Isn't it?

about input that seem the only one work for your theme:
<input class="your class here" type="button" onclick="location.href='<?php echo wp_logout_url(); ?>'" value="<?php echo __('Logout' , 'wp-w3all-phpbb-integration' ); ?>" />
change your class in accord with theme

Code: Select all

class="your class here"
but i've just open your site and i see that the button look ok (even not all elements are perfectly aligned, and your links on last topics are all loking like text) ... a little style more is required ;), the logout now work fine also?

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

by Goofkop » Sun Apr 09, 2017 9:46 am

Yeah i dont have a default template.

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

by axew3 » Wed Apr 05, 2017 9:28 am

:) these are things that can take just a second, no problem. But since are things where many times the answer depend on how the html/css code is done for the template, it is sometime necessary to see the code used on the template,to apply the correct modification and achieve the result.
All examples are working fine into twentysixteen default WP theme.

About above, strange that examples aren0t working because all are working on my tests, but this not mean that your theme can have some code that lead to not work the above code.
So to resume and give you the correct secure way:
use the example that work for you, and apply the css style to the input element, in accord with your css theme style.

Top