• scottsemple

    (@scottsemple)


    I’m trying to style wp_loginout without success. Shouldn’t this work?

    <?php wp_loginout('class="woo-sc-button"'); ?>

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael

    (@alchymyth)

    Thread Starter scottsemple

    (@scottsemple)

    Thanks. I read that previously, but I didn’t see ny info on adding a selector.

    Michael

    (@alchymyth)

    there is probably no parameter to add an selector.

    however, wp_loginout() has a filter hook 'loginout' which you could use to influence the output – i.e. to include a selector.

    for instance by adding a filter function like this to functions.php of your theme:

    add_filter('loginout', 'loginout_selector');
    function loginout_selector($text) {
    $selector = 'class="woo-sc-button"';
    $text = str_replace('<a ', '<a '.$selector, $text);
    return $text;
    }
    Thread Starter scottsemple

    (@scottsemple)

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add a selector to wp_loginout’ is closed to new replies.