Skip to:
Content
Pages
Categories
Search
Top
Bottom

How Can I Append a ‘Random Article’ Link to the Visit Menu?

  • I’d like to add a Random Article Link to the Visit menu in the BP bar. I’d likely use a randomizer plugin to pick the article. I’ve had requests for a random article link there.

    I’ve been able to add menus w/drop downs to the bar, but I don’t know how to add to an existing menu. Any advice?

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

  • r-a-y
    Keymaster

    @r-a-y

    Hook into the “bp_adminbar_random_menu” action.

    function my_random_article() {
    echo 'YOUR LINK';
    }
    add_action( 'bp_adminbar_random_menu', 'my_random_article' );

    Add to your theme’s functions.php.

    Thank you @r-a-y! You rock!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How Can I Append a ‘Random Article’ Link to the Visit Menu?’ is closed to new replies.
Skip to toolbar