# Login Customization for Discourse SSO

**URL:** <https://meta.discourse.org/t/login-customization-for-discourse-sso/61317>\
**Category:** WordPress\
**Created:** [4월 20, 2017, 9:11오전 UTC](https://meta.discourse.org/t/login-customization-for-discourse-sso/61317 "2017-04-20T09:11:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [4월 20, 2017, 5:47오후 UTC](https://meta.discourse.org/t/login-customization-for-discourse-sso/61317/2 "2017-04-20T17:47:46Z")

</div>

A css class should be added to the SSO client login shortcode links so that they are easier to target with css. I’ll do that for the next release of the plugin. Until then, you can still style the links, they are just a little harder to target with css.

Styling the link on the login page is a little trickier. It can be done by adding something like this to your theme’s `functions.php` file. Maybe we should add an option to the plugin to help with this. (These styles are from an online button generator. Make sure to replace the ‘my\_namespace\_’ prefix in the function name and the function call with something unique to your website.)

```plaintext
function my_namespace_login_styles() { ?>
    <style type="text/css">
        #loginform a {
            display: inline-block;
            text-align: center;
            vertical-align: middle;
            padding: 12px 24px;
            border: 1px solid #a12727;
            border-radius: 8px;
            background: #ff4a4a;
            background: -webkit-gradient(linear, left top, left bottom, from(#ff4a4a), to(#992727));
            background: -moz-linear-gradient(top, #ff4a4a, #992727);
            background: linear-gradient(to bottom, #ff4a4a, #992727);
            text-shadow: #591717 1px 1px 1px;
            font: normal normal bold 20px arial;
            color: #ffffff;
            text-decoration: none;
            width: 225px;
        }
        #loginform a:hover,
        #loginform a:focus {
            background: -webkit-gradient(linear, left top, left bottom, from(#ff5959), to(#b62f2f));
            background: -moz-linear-gradient(top, #ff5959, #b62f2f);
            background: linear-gradient(to bottom, #ff5959, #b62f2f);
            color: #ffffff;
            text-decoration: none;
        }
    </style>
<?php }
add_action( 'login_enqueue_scripts', 'my_namespace_login_styles' );

```

> [@itsbhanusharma](#):
>
> Can the [discourse\_sso\_client login=‘Login Through the Forum’] be used in a text widget to make it visible across the website?

You can get text widgets to work with shortcodes by adding something like this to your theme’s `functions.php` file:

`add_filter( 'widget_text', 'do_shortcode' );`

---

_[View the full topic](https://meta.discourse.org/t/login-customization-for-discourse-sso/61317)._
