Add a vertical line between the Edit Profile link and Logout link

Hello,
Site: http://yourtechadvisors.com
I have an Edit Profile link and a Logout link that are really close together, to separate the 2, I would like to insert a vertical line. Is this possible?

EDIT: I think this is the correct markup.

<?php
if ( is_user_logged_in() ) {
	$current_user = wp_get_current_user();
	echo '<div style="float: right; width: 200px;"><div style="float: left; padding-right: 20px;">'.get_avatar( $current_user->ID, 32 ).'</div><div><p>Welcome '.$current_user->display_name.'!<br><a href="http://yourtechadvisors.com/edit-profile">Edit Profile</a>
<div id="vertical-line"></div>
<a href="' . wp_logout_url( get_permalink() ) . '">Logout</a>
</p></div></div>';
}
?>

Support access is enabled.

Thanks.

  • Adam Czajczyk

    Hello Alex!

    I've modified the code in your Custom CSS and added "right border" to elements resulting in vertical line between elements. Please check the CSS from line no. 428 to the end.

    I have also fixed the code in your header by adding back the "widget-welcome" class name to the enclosing DIV element as we discussed during live chat today.

    Just for further reference: in case you'd pasted widget's code anywhere in forum from now on please use the code that's currently inside you header.php file instead of the one that's already posted in various places here. :slight_smile:

    Cheers,
    Adam

  • Alex Stine

    Hello,
    OK, you must have forgotten the div we discussed during chat, it was welcome-widget. I have updated the css and the 2 references in header.php, now both have the vertical line. :slight_smile:
    Now there is a new problem, the Logout link got pushed down to the next line, anyway to fix that?

    Just for further reference: in case you'd pasted widget's code anywhere in forum from now on please use the code that's currently inside you header.php file instead of the one that's already posted in various places here. :slight_smile:

    I do not understand what you mean by this, I copied and pasted the code in to the forum from header.php. Do you not want me to include the code here anymore? I did not want to send you on a wild chase, but what ever works.

    Can you please clarify?
    Thanks.

  • Adam Czajczyk

    Hello Alex!

    I'm sorry if I confused you! Let me explain myself :slight_smile:

    During today's chat you have added the class name to the DIV enclosing widget. The code posted in this thread doesn't have that class. I'm not sure why, I suppose that's because of your other thread where you also posted the code and which I fixed. This was a thread about logout link not working. I think it may have been posted before our conversation so there was no class name.

    That said, while fixing logout link we may have removed the class name. However, I've added it back to the code and the proper code is now in your header.php file.

    Moving on from that, the vertical line has pushed the logout link to the next line, anyway to keep it on the same line?

    It's not pushed down for me but again, I made a small change. In Custom CSS code (from line no. 428) I increased widget width from 200 to 230 pixels and I decreased side paddings and margins for links. Hopefully, this will help.

    Cheers,
    Adam

  • Alex Stine

    Hello,
    Sorry, caching issue again :slight_frown:, you would think I would have learned by now.

    I updated my post above before you could see it, you said widget-welcome when the one discussed in chat was welcome-widget. I did not know this code was supposed to be added to the Edit Profile Widget, but I will not question it. It served its purpose in the end.

    Now that I know what you mean, I did not post it from somewhere else in the forums, I posted it from my out of date NotePad document of header.php that was my fault. I will check the 2 versions before posting next time.

    Now that all the confusion is cleared up between, what you mean and what I mean, I can mark this one resolved. :slight_smile:

    Sorry for working you like a dog BTW. Do you ever get a break?

    Thanks :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.