I am looking for something very simple but I'm not quite sure how to achieve this. I have been researching for the past 2-3 hours and gathered a lot of useful information. However, my knowledge in both PHP and WordPress isn't enough to do this from scratch.
What I need is the following:
When the user is not logged in, this HTML code should be displayed:
<a href="#">Login</a>
When the user is logged in, the previous HTML code should be replaced with:
<span>Welcome, *username*</span> <a href="actual-link-for-logging-out-the-user">Logout</a>
Could anyone please help me out. I'd really appreciate the help :)
Thanks