Skip to:
Content
Pages
Categories
Search
Top
Bottom

custom button in buddy-bar

  • Avatar of Unsal Korkmaz
    Unsal Korkmaz
    Participant

    @unsalkorkmaz

    ok.. i read faq section but couldnt understand so good actually.

    what i want?

    just add new button to buddy-bar for my forum. a forum link to buddy-bar

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of Paul Gibbs
    Paul Gibbs
    Keymaster

    @djpaul

    Well, if you’ve already read this http://codex.buddypress.org/how-to-guides/modifying-the-buddypress-admin-bar/ and maybe this http://buddypress.org/forums/topic.php?id=2283, and do not understand, unless you are prepared to further your understanding of PHP and WordPress’ API, you need to find a developer to write the code for you.

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    Here’s a little something to try.

    Create a “bp-custom.php” file in your /wp-content/plugins/ directory.

    Put in the following code:

    function my_new_buddybar_button(){
    echo '<li class="no-arrow"><a href=""YOUR LINK"><img src="YOUR BUTTON" alt="" /></a></li>';
    }
    add_action('bp_adminbar_menus', 'my_new_buddybar_button', 101);

    Untested, but should work…

    Change “101″ to where your button should be.

    eg. “1″ would move it to the beginning (right after the BP logo)

    Avatar of Unsal Korkmaz
    Unsal Korkmaz
    Participant

    @unsalkorkmaz

    thank you so much r-a-y

    Avatar of circuit
    circuit
    Participant

    @circuit

    to be fair to the OP, i think the buddypress admin bar documentation is quite difficult to follow. i imagine that it would be even more difficult for anyone whose first language is not english.

    (for example: “To change a function that is triggered by an action you have to unhook the current function that responds to the action and supply your own function that replaces the core function and then replace the add_action() call with one that responds to the same hook as the original function.”…)

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.