Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1209667

    leehart09
    Participant

    Hello,

    I applied some code that I found through another member’s question/answer on this forum to allow me to have a login and register link on topbar, and logout when you are already logged in.

    I just have 2 questions I’m hoping you can help with:

    1. The text colour for these items at the minute is white (same as the nav bar I’m guessing), so you can’t actually see the links against my white background. How do I change the colour of these links (and also on hover). Is it possible to have a vertical bar (|) separating the two links for a cleaner look? And can I make the text slightly larger?

    2. The logout link redirects me to a page saying ‘Are you sure you want to logout?’ which I’m guessing is a standard wordpress thing. But when I click yes, I’m redirected to an error 404 page. I have installed the plugin “ithemes security’ to allow me to redirect the wp-admin to a custom page for security purposes. Perhaps this has changed the working logout page or something? Can you help me redirect it to the homepage, like the rest of the logout links are doing (i.e. from the bbpress login widget).

    One more thing – slightly off topic – but I have my logo in the space between the navbar and topbar. However, there seems to be a lot of wasted space here. Would it be possible to move it to the topbar in the same centered position it is now?

    #1209737

    leehart09
    Participant
    This reply has been marked as private.
    #1209767

    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in!

    1] To change the link color and hover link, please add the following css code in the customizer, Appearance > Customize > Custom > CSS

    .x-topbar .p-info {
      color: #000;
    }
    
    .x-topbar .p-info a {
        color: red;
    }
    
    .x-topbar .p-info a:hover {
        color: blue;
    }

    Feel free to change the color that will match your site colors. And if you want it separated by a (|), please update your topbar content, you can use this instead:

    
    <a href="/userlogin" class="wp-login-url">Log In</a> | 
    <a href="/registration" class="wp-register-url">Register</a> | 
    <a href="/userlogin.php?action=logout" class="wp-logout-url">Log Out</a> 

    For your reference, you can check out this topic: https://community.theme.co/forums/topic/login-and-register-or-logout/#post-1057503

    hope this helps.

    #1211455

    leehart09
    Participant

    Thank you so much. I applied the CSS you gave me, and also followed the steps set out in the link you directed to me, and it all works perfect! It has even allowed me to add a ‘My profile’ link in the top left corner also!

    Thanks again for your help! I really appreciate it.

    #1211561

    Joao
    Moderator

    Glad to hear it,

    Joao