• Resolved littlejohnnyhugo

    (@littlejohnnyhugo)


    Hi –

    I would like to customize the Meta Widget to have a message like:
    Welcome Guest/Welcome username

    I have succeeded in putting that on my page by using the code:

    <?php if(!$user_ID ) :?>
    Welcome, Guest
    <?php else :?>
    Welcome Back, <?php
    global $current_user;
    if ( isset($current_user) ) {
        echo $current_user->user_login;
    }
    ?>
    <?php endif;?>

    However, when I add it to the plugin under the title, it doesn’t recognize logged in users. Also there any way to put this into the title? That would really be great!

    https://www.ads-software.com/extend/plugins/customize-meta-widget/

Viewing 2 replies - 1 through 2 (of 2 total)
  • You forgot just one little thing – also you need to write
    “global $user_ID;” – after it everything works fine.

    I also answered this question in my blog.

    Thread Starter littlejohnnyhugo

    (@littlejohnnyhugo)

    Thanks SO Much Jehy! I’m very new at this, so i didn’t see that!!
    I put it in like this and it is beautiful:

    <?php
    global $user_ID;
    if(!$user_ID ) :?>
    Welcome, Guest
    <?php else :?>
    Welcome Back, <?php
    global $current_user;
    if ( isset($current_user) ) {
        echo $current_user->user_login;
    }
    ?>
    <?php endif;?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Customize Meta Widget] Personalize the Title’ is closed to new replies.