Modifying Register and Login Links for WP-Admin Bar

My theme has a nice light box login, but I want to use and keep the WP-Admin Bar on the top of the site for BuddyPress users. Can someone tell me how I can do the following without using a plugin. I am using Nginx, so no htaccess file.

I made a plugin where I paste snippets and mods, is there a functions snippet that will tweak WP Admin bar to do the following:

I want the WP-Admin Bar Login Link to point to:

<a data-reveal-id="tmpl_reg_login_container" href="javascript:void(0);" onclick="tmpl_login_frm();">Login</a>

and the register link to point to:

<a data-reveal-id="tmpl_reg_login_container" href="javascript:void(0);" onclick="tmpl_registretion_frm();">Register</a>

  • Vaughan
    • Support/SLS MockingJay

    Hi Jay,

    It's difficult to change to those URLs, what is easier would possibly be to actually remove those links entirely, and then add new links of your own.

    Could you post a URL to the site, so I can see those login & register links, This helps as I can then view the source to get the links id's in order to remove them with a function. Though I think you're talking about the BP admin bar & not the WP admin bar.


  • Jay
    • Design Lord, Child of Thor


    It's on a staging server, and I don't want to post it publicly. Can I PM it to you?

    Also it's using buddy press. I believe the IDs are


    Here is the source code for that section:

    <div id="ub_admin_bar_wrap">
        		<div id="wpadminbar" class="" role="navigation">
    			<a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1">Skip to toolbar</a>
    			<div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="Top navigation toolbar." tabindex="0">
    				<ul id="wp-admin-bar-root-default" class="ab-top-menu">
    		<li id="wp-admin-bar-bp-login"><a class="ab-item" href="">Log in</a>		</li></ul><ul id="wp-admin-bar-top-secondary" class="ab-top-secondary ab-top-menu">
    		<li id="wp-admin-bar-search" class="admin-bar-search"><div class="ab-item ab-empty-item" tabindex="-1"><form action="" method="get" id="adminbarsearch"><input class="adminbar-input" name="s" id="adminbar-search" type="text" value="" maxlength="150"><input type="submit" class="adminbar-button" value="Search"></form></div>		</li></ul>			</div>
  • Jack Kitterhing
    • Code Norris

    Hi there @Jay,

    Hope you're well today and thanks for your question.

    Can you send me the link and logins using our contact form. Based on the above though, to remove the links with CSS, you'd use

    #wp-admin-bar-bp-register {
    display: none; }

    Alternatively you could also use our Ultimate Branding plugin to edit those links

    - In the subject field add "Attn: Jack Kitterhing"
    - Link back to this thread
    - Include admin/network access
    - Include FTP
    - Include any relevant URLS for your site

    On the contact form, select "I have a different question", this ensures it comes through and gets assigned to me.

    Thank you!

    Kind Regards

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.