I need to display login link for the user with redirection to home page
<?php if (!is_user_logged_in()) : ?>
<a href="<?php wp_login_url(get_option('siteurl')); ?> "> login</a>
However this produces the following
<a href=" "> login</a>
What i am doing wrong?
You need to echo it