welcome users in wordpress

Greeting Users in WordPress

Somewhere along the line, you may find it necessary to greet visitors in a different way, based on conditions i.e. Are they logged in or not?. So, let’s take a look at this in code.

Greeting a logged in user:

Conditional Greeting:

Another use for wp_get_current_user():

I hope you found this resource useful!

Interested in WordPress Plugin Development?

Wordpress Plugin Development Video Tutorial

At ZENVA we have a comprehensive video course on WordPress Plugin Development, check it out here.

Published by

Ashley Menhennett

Ashley is a web designer + developer, programmer and technical author from Australia.Ashley holds certification in IT + Web Based Technologies and specializes in modern mobile and responsive web design, working with bleeding-edge web based technologies—including HTML5 and CSS3.

Share this article