Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Change site name in admin bar

  • Profile photo of coaster101
    coaster101
    Member

    @coaster101

    I am trying to modify the site name of my admin bar. Currently it says “website” but I want it to say “website connect”. What would be the easiest way to do this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Profile photo of aces
    aces
    Participant

    @aces

    Hopefully the following link might help? https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/add-a-welcome-message-to-admin-bar-instead-of-website-name/#post-87017 ?

    I use a version of it though the admin menu bar is only seen by those logged in….

    Profile photo of coaster101
    coaster101
    Member

    @coaster101

    I really just want to add one word after the blog’s name, not a welcome message. Is there a simpler way to acheive that? Thanks for the repsonse.

    Profile photo of pcwriter
    pcwriter
    Participant

    @pcwriter

    @coaster101

    In your WordPress backend, go to “Settings” > “General” and modify the “Site Title”. Whatever you enter there will be displayed in the adminbar.

    Profile photo of coaster101
    coaster101
    Member

    @coaster101

    This would be only for the admin bar, though. I don’t want to change the title of the entire site.

    Profile photo of @mercime
    @mercime
    Keymaster

    @mercime

    If you don’t have one yet, create file named bp-custom.php and add the code below then upload to server in wp-content/plugins/ folder

    <?php
    
    remove_action( 'bp_adminbar_logo',  'bp_adminbar_logo' );
    
    function my_adminbar_name() {
    global $bp;
    echo '<li><a>root_domain . '">' . Website Connect . '</a></li>';
    }
    add_action('bp_adminbar_menus', 'my_adminbar_name', 1);
    
    ?>

    Replace “Website Connect” with what you want.

    Profile photo of coaster101
    coaster101
    Member

    @coaster101

    I uploaded that file to the wp-content/plugins folder and received this error:

    Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /home2/websitro/public_html/wp-content/plugins/bp-custom.php on line 7

    Profile photo of @mercime
    @mercime
    Keymaster

    @mercime

    replace that line with

    Profile photo of coaster101
    coaster101
    Member

    @coaster101

    Now it just adds a link to the right of the site title, it looks the same as “My Account”, “Dashboard”, etc. It has an arrow besides it as well.

    So it looks like this: “Website” “Website Connect v” “My Account v” “Dashboard v” “Notifications v”

    Profile photo of @mercime
    @mercime
    Keymaster

    @mercime

    Yeah, I was in midst of correcting that hopefully before you saw it. Haste made waste.

    function my_adminbar_name () {
    global $bp;
    echo '<a>root_domain . '" id="admin-bar-logo">Welcome Connect</a>';
    }
    remove_action('bp_adminbar_logo','bp_adminbar_logo');
    add_action('bp_adminbar_logo','my_adminbar_name');

    EDIT – Works when you put this in your active theme’s functions.php file (instead of the bp-custom.php file in plugins directory as mentioned above. Thanks to @DJPaul in this post).

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] Change site name in admin bar’ is closed to new replies.
Skip to toolbar