WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Adding login and register links to the header

[Resolved] Adding login and register links to the header

Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi

    @esmi

    Forum Moderator

    Your first instinct was right. The two template tags you need are <?php wp_register(); ?> and <?php wp_loginout(); ?>. It’s the placement within your header that’s the problem. The header image is masking/hiding the links. Try adding:

    <ul class="headerlinks">
    <li><?php wp_register(); ?></li>
    <li><?php wp_loginout(); ?></li>
    </ul>

    immediately after <div id="header"> in header.php.

    Then add the following to style.css:

    #header .headerlinks {
    	position:relative;
    	top:20px;
    	left:600px;
    	z-index:500;
    }
    #header .headerlinks {
    	display:inline;
    	margin:0 5px 0 0;
    	padding:0;
    }

    The positioning is unlikely to be right first time and will need adjusting but should get you started.

    Thank you thank you thank you!!!!! That worked! 😀 You rock.

    LOL, not to sound picky, but any idea how I could get them into the spacer div located below the header? I’d really prefer the links to be to the left of the search box on my page, but that area is not a part of “header”. As far as I can tell it’s part of “content”.

    esmi

    @esmi

    Forum Moderator

    Try playing with the top and left positioning in #header .headerlinks. You might be able to shift them to the position you want but I’m not sure how well that will work cross-browser.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Adding login and register links to the header’ is closed to new replies.