How to Display A User Welcome Message In WordPress

Written by | Posted in WordPress | Posted on Date 18-01-2012 | Comments 41 Comments
Tags: , ,

wordpress-tricks

Whether you just like to put up a personal greeting or have a site that has quite a few users, something a welcome message is nice. I have seen a few people put this together and have a centralized paged where users can log in, read the personal message, and then go on their merry way using the website.

The code is really simple. This code calls the current user. If you want to only let people like contributors or other roles see the message, you have to adjust the level_0 to any of the levels corresponding with the roles. (Example: administrator is 10).

Please note that you need to be careful on what you greet your visitors. If your normal readers expect you to be goofy, or a little on the strange side, that is fine. However, I have seen a couple sites that have creeped me out with some weird greetings.


< ?php global $user_ID; if( $user_ID ) : ?>
< ?php if( current_user_can('level_0') ) : ?>

Welcome < ?php global $current_user; get_currentuserinfo(); echo ($current_user->user_login); ?>
< ?php else : ?>
< ?php endif; ?>
< ?php endif; ?>

You can edit the little welcome message to whatever you like.

This is also for connecting via social network handles.

Related Posts

About Nile Flores

Nile is 30 year old female from Southern Illinois. Nile is a mother of 1 son. She is also a web and graphic designer, who exclusively designs using WordPress. She is currently a student working for a Bachelors in Business. She also blogs at WPAddict.net and FamousBloggers.net

Connect with Nile at: Twitter | Facebook | LinkedIn

Nile has written 686 articles at Blondish.net.

Comment Policy

Please do not leave just keywords for your name. You will no longer be approved. The correct way to leave your name is YOUR NAME @ YOUR KEYWORD or YOUR NAME | KEYWORD if you choose to use a keyword.

Comments (41)

  • Peter Fuller MBA
    Twitter:
    says:

    Hey Niles

    I already know, but one question for those who don’t, where and how do you add this code.

    Peter
    Peter Fuller MBA recently posted..The Easiest and Best Way to Make Money OnlineMy Profile

  • Akos Fintor
    Twitter:
    says:

    Hey Nile,

    Great tip. Let me see if I can put it to use.
    thanks for the share.

    Akos
    Akos Fintor recently posted..Tips for Online Success | Got What It Takes?My Profile

  • Jupiter Jim
    Twitter:
    says:

    Nile,
    Thanks for sharing this. Welcome message is a great idea! On Thesis Theme this code would probably go in the custom_functions.php file, but like Peter Fuller, who commented above me, I’m wondering which file to paste this code and where on the file?

    Thanks for continuing to share all these tips and tricks with us!!!

    – Jupiter Jim
    Jupiter Jim recently posted..The Proper Way to Paste MS Word Text into your WordPress Blog Post or PageMy Profile

  • Anonymous says:

    This is wxactly what I was looking for our blog …thank you so much..

  • Levi Nash says:

    Thanks for the codes. I haven’t consider doing a welcome page except for the “Thank You Note” after someone left a comment on my post, it’s just that I want them to feel free exploring mys site without any destruction from whatever message for welcome. Thanks for the idea, I’ll think about it.
    Levi Nash recently posted..TN traffic fatalities declined in 2011My Profile

  • Carrie says:

    This is what most bloggers need…Thanks a lot for the great post and every informative article…
    Carrie recently posted..Waterfront Key SingaporeMy Profile

  • Lily Rose says:

    Welcome message is a really good idea. Especially because it’s really not that hard to make it and it gives that personal touch to your blog.

    • johnavery says:

      Amen,Welcome messages along with giving a personal touch can also update us with the current happenings.There are association football club sites which i often visit,when the home page is changed i get instantly connected to the content,either it be a merry Christmas,or club shops opens today.
      johnavery recently posted..Classic CarsMy Profile

  • Anonymous says:

    I haven’t consider doing a welcome page except for the “Thank You Note” after someone left a comment on my post, it’s just that I want them to feel free exploring mys site without any destruction from whatever message for welcome….details visit:- http://www.newusanews.com/

  • Anonymous says:

    I haven’t consider doing a welcome page except for the “Thank You Note” after someone left a comment on my post, it’s just that I want them to feel free exploring mys site without any destruction from whatever message for welcome.

  • Manuel Marino
    Twitter:
    says:

    weird greetings? can you make a couple of examples? I’m curious :)

    anyway, I don’t like to greet with entire pages, I always think I can make the reader run away.

    It’s better a single line on top of the blog, maybe appearing just for the first 3 visits
    Manuel Marino recently posted..How To Learn Guitar TabsMy Profile

  • Venus says:

    Thanks for sharing this.Wordpress is easy to use and manage but often gives many problem to the users.This made my work simpler.

  • Michael Wong
    Twitter:
    says:

    The welcome page is a good idea, possibly I might tailor for promotion codes or timely stuff, but I never knew that was possible until I read your wonderful post. Thank you and I look forward to coming back for more tips.

    fb liked it, SU liked it, and dugg it.

    thanks
    Michael Wong recently posted..Keepons deluxe clearMy Profile

  • Magic Tricks says:

    Maybe I am being stupid but where exactly do I add this code?
    Magic Tricks recently posted..Looking For Magic Guest PostersMy Profile

  • dev
    Twitter:
    says:

    Welcome Message that really a cool idea thanks I will definitely give it a try.
    dev recently posted..Facebook CareersMy Profile

  • Arjee says:

    Hi! Good day! Thank you for the mini tutorial. I learned from it. I hope I could learn more about wordpress.

  • Chris Danial says:

    Very nice post I don’t like to greet with entire pages, I always think I can make the reader run away. Thanks for the sharing, keep up good work.
    Chris Danial recently posted..Buy ForexMy Profile

  • Mike Maynard says:

    Interesting tip. I made a note of it.
    Mike Maynard recently posted..Psychology | Persuasion, Suggestion and RepetitionMy Profile

  • Very cool tip! I (also) have a special welcome message for those who leave a comment, but I’ll definitely consider this as well. Thanks!
    marquita herald recently posted..The Key to Managing Major Life Change is to have a StrategyMy Profile

  • vishvast
    Twitter:
    says:

    hello nice tips …i was really luking for it frm so many dzzz nw i find it here thnx for this post really nice share
    vishvast recently posted..Windows Phone 7.5: How To Create Custom RingtonesMy Profile

  • Hi,

    Thanks for the tip. I have never tried this before and I am really excited to add this new tip to my blog. It’s great finding out new things to make blogs even better. Thanks!
    Vernette Carbon recently posted..Coconut Oil – The Benefits Of Coconut Oil And Why You Should Start A Coconut BusinessMy Profile

  • Hanna from Canon Powershot SX210IS says:

    Like the others said, “Where do I put the codes?”. I loved your post but lack in additional info. Really, where do we put codes?

  • Kriscia says:

    I hope this can help and this can work for me…Thanks a lot for the great post..Great job!!
    Kriscia recently posted..How to Diet to Gain MuscleMy Profile

  • Anja says:

    Hello Nile,

    Great idea to have a welcome message. I made a note of it but I don’t know where to add the code like the others.

    -Anja

  • Hi,

    for someone who isn’t a coding hero, where would I put this code in order to create the welcome message?
    Danny Chapman recently posted..Insight to the Chod Rig with Danny FairbrassMy Profile

  • Anonymous says:

    Thanks so much for this Nile. I have some regular contributers to my blog that it would be really great to recognise, and this code will do that for me. Cheers! Louisa

  • Thank you for this. I am very new to WordPress and have been trying to pick up some tricks here and there.

    Love your blog by the way.

  • Jordan
    Twitter:
    says:

    This is a fantastic idea! Do you know if there is a similar cod for blogger users?
    Jordan recently posted..The Health Benefits of Apple Cider VinegarMy Profile

  • I had no idea that was possible Nile! Great share, I’m sure there are heaps of people who would like to implement a welcome. I’ll share this around, thanks for sharing here :)
    sadie-Michaela Harris recently posted..Mobile Marketing 7 Deadly Sins InfographicMy Profile

  • Shameka Hennagir says:

    What a useful tip. This one is probably I want to give a try and I never thought of it that it is possible to display a user welcome message in WordPress. Thanks!
    Shameka Hennagir recently posted..Timber Doors BrisbaneMy Profile

  • don says:

    I’m now switching over from weebly to word press it is quite a job for me but thank you very much for the help.

  • Ja-C says:

    Thanks a lot for letting us know about this update…gerat job!!I hope you can post more of this too…
    Ja-C recently posted..second hand cars stroudMy Profile

  • Lee says:

    Good Post – Many blog owners do not do this.
    If you have a welcome page or about us page this can help -
    Nile – Thanks for the info.
    Lee recently posted..Checking at Professional Entertainment for an Amazing PartyMy Profile

  • Lynn Jones
    Twitter:
    says:

    Wow, what a great idea. Now if I can just figure out how to do it. Me and WP don’t have a loving relationship. We are kind of distant because one of us doesn’t understand the other very well. :)
    Thanks for sharing a great tip with us.
    Lynn
    Lynn Jones recently posted..Our Pursuit of HappinessMy Profile

  • This was a good post. Please let me know is this possible on blogger platform. Waiting for reply. Thanks

  • Katie Woodard
    Twitter:
    says:

    This sounds like a cool thing to do. It could make users feel welcome and special if you personalize it. I’m going to do this.
    Katie Woodard recently posted..Slim (of 112) – Cruisin’ Da City Vol 1 MixtapeMy Profile

  • Arjun Rai says:

    Thats really an amazing thing to do for our visitors, i hope they will feel more familiar after this.
    Arjun Rai recently posted..ReposMy Profile

  • Very Interesting!

    I have a welcome video on my squeeze page, but I can sure see where this would come in handy on my other site.

    Thanks for the tip
    Carla McNeil, Social Media Manager recently posted..Social Media Marketing – Are You Careful With Your Online Reputation? You Need to BeMy Profile

  • This was a good post. Please let me know is this possible on blogger platform. Waiting for reply. Thanks
    Raquel Johnson recently posted..You Must Have These Free Android Apps [www.FORTRICKS.in]My Profile

    • Nile says:

      Hi Raquel! I do not use blogger, but because it is not open source and most people can only alter the CSS of blogger, I do not think this is possible. However, I would recommend asking Ileane of BasicBlogTips.com. She has used blogger and is far more familiar with Google Blogger.

  • jobin says:

    Good points…really a great idea thanks I will definitely give it a try.I’m sure there are heaps of people who would like to implement a welcome….

    http://www.findghar.com

  • Write a comment

    CommentLuv badge