Search bar in adminbar

Home Forums BP Profile Search Forum Search bar in adminbar

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #7627 Reply

    Hey 🙂

    Is it somehow possible to have the search bar implemented in the admin bar?

    I tried to implement:
    <?php do_action (‘bps_display_form’, ID); ?>
    [bps_display form=ID]
    but the only way I could add something to the adminbar was with this method:

    add_action('admin_bar_menu', 'nebula_admin_bar_menus', 800);
    function nebula_admin_bar_menus($wp_admin_bar){
            'id' => 'nebula-github',
            'title' => 'Nebula Github',
            'href' => '',
            'meta' => array('target' => '_blank')
            'parent' => 'nebula-github',
            'id' => 'nebula-github-issues',
            'title' => 'Issues',
            'href' => '',
            'meta' => array('onclick' => 'exampleFunction(); return false;') //JavaScript function trigger just as an example.

    As I see there is only href or onclick…

    Thank you soo much

    #7628 Reply

    Hello Yeon,

    Yes, you can only add links to your toolbar. I suggest you create a new page, and add it to the toolbar, following the instructions here:

    Then, in the new page you created, insert the shortcode of your search form (take the shortcode from the Users => Profile Search settings page, after you create your form).

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Search bar in adminbar
Your information: