Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1044062

    mwyanniello
    Participant

    Hi there,
    i want in my top bar LOG IN | REGISTER, then once logged in LOG OUT | ACCOUNT

    i added this in the topbar content:

    Log In
    Register
    Log Out

    and then this in the custom CSS:
    .wp-login-url:before,
    .wp-register-url:before,
    .wp-logout-url:before {
    content: ‘ | ‘;
    }

    .wp-logout-url,
    .logged-in .wp-login-url,
    .logged-in .wp-register-url {
    display: none !important;
    }

    .logged-in .wp-logout-url {
    display: inline !important;
    }

    it works but it doesnt show ACCOUNT after logged in, what am i missing?

    #1044064

    mwyanniello
    Participant
    #1044072

    mwyanniello
    Participant

    I also want to add icons in front of each:

    login- .fa-key
    logout- .fa-sign-out
    register(create account)- .fa-pencil-square-o
    account- .fa-user

    is this possible as well?

    #1044109

    mwyanniello
    Participant

    The logout button wont work either, i have a custom login, create account pages.

    http://59e.88a.myftpupload.com/account/

    http://59e.88a.myftpupload.com/create-an-account/

    I dont use the standard wordpress pages. Is that why?

    #1044515

    Rue Nel
    Moderator

    Hello There,

    Please update your topbar content and use this instead:

    <a href="/account/" class="wp-login-url"><i class="x-icon-key" data-x-icon=""></i> Log In </a>
    <a href="/create-an-account/" class="wp-register-url"><i class="x-icon-pencil-square-o" data-x-icon=""></i> Register </a>
    <a href="/login.php?action=logout" class="wp-logout-url"><i class="x-icon-sign-out" data-x-icon=""></i> Log Out </a>
    <a href="/account/" class="wp-account-url"><i class="x-icon-user" data-x-icon=""></i> Account </a>

    You need to copy the raw code from here (http://pastebin.com/qVB4v9Bq) to preserve the data-x-icon value.

    And if the logout link will not work, please use a full direct link like this:

    
    http://your-domain.com/login.php?action=logout

    Hope this helps. Kindly let us know.

    #1045297

    mwyanniello
    Participant

    Hi thank you so much for the reply, everything worked besides the logout. but i changed the url /customer-logout/ and it worked. I’m using the toolset plugin for login/registration pages so the url is different.

    Last thing, what CSS can i add to hide the account link to only show when the customer is logged in? I dont want it to be visible when they arent logged in.

    Thanks

    #1045464

    Jade
    Moderator

    Hi there,

    Please add this in the CSS customizer:

    .wp-account-url { display: none; }
    .logged-in .wp-account-url { display: block; }

    Hope this helps.

    #1046953

    mwyanniello
    Participant

    I was very close to the correct coding but forgot the {}.

    Thank you very much, as always you guys are the best!

    #1047068

    Paul R
    Moderator

    You’re welcome! 🙂