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.
Peter Fuller MBA says
Hey Niles
I already know, but one question for those who don’t, where and how do you add this code.
Peter
Akos Fintor says
Hey Nile,
Great tip. Let me see if I can put it to use.
thanks for the share.
Akos
Jupiter Jim 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
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.
Carrie says
This is what most bloggers need…Thanks a lot for the great post and every informative article…
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.
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 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
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 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
Magic Tricks says
Maybe I am being stupid but where exactly do I add this code?
dev says
Welcome Message that really a cool idea thanks I will definitely give it a try.
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.
Mike Maynard says
Interesting tip. I made a note of it.
marquita herald says
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!
vishvast 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
Vernette Carbon says
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!
Hanna 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!!
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
Danny Chapman says
Hi,
for someone who isn’t a coding hero, where would I put this code in order to create the welcome message?
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
Chris Lucernoni says
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 says
This is a fantastic idea! Do you know if there is a similar cod for blogger users?
sadie-Michaela Harris says
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 ๐
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!
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…
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.
Lynn Jones 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
Itender Rawat says
This was a good post. Please let me know is this possible on blogger platform. Waiting for reply. Thanks
Katie Woodard 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.
Arjun Rai says
Thats really an amazing thing to do for our visitors, i hope they will feel more familiar after this.
Carla McNeil, Social Media Manager says
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
Raquel Johnson says
This was a good post. Please let me know is this possible on blogger platform. Waiting for reply. Thanks
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