New Menu items on Top Bar

Discussion in 'WordPress' started by anto74, Mar 16, 2014.

  1. Have feature suggestions for the WordPress plugin? Post or vote here.
  1. anto74

    anto74 Member

    Hi @xfrocks :)
    It's possibile add ( hardcoded now or future implementation ) new items menu on Top Bar or it's possibile to have only Forum menu? :)
    Thanks :)
    Antonio
     
  2. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    That's possible. You can put some code in your theme for that I think.
     
    anto74 likes this.
    1. anto74

      anto74 Member

      anto74 @xfrocks I looked at the code of topbar in your addon, in templates folder...i can insert code in this file ?
      I would switch off the wordpress menu and insert some item menu in your topbar, to avoid having two menu...

      Clipboard01.jpg
       
    2. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @anto74 You can put something like this is any of the theme file

      PHP:

      function anto74_admin_bar_menu($wpAdminBar)
      {
      $wpAdminBar->add_menu(array(
      'id'=>'anto74-home',
      'title'=> 'Home',
      'href'=> 'http://domain.com/home',
      ));
      }

      add_action('admin_bar_menu','anto74_admin_bar_menu',PHP_INT_MAX);

       
      anto74 likes this.
      1
    3. anto74

      anto74 Member

      anto74 @xfrocks Thanks :)
      I hope to figure out where to insert the code :D
       
      xfrocks likes this.
      1
    4. anto74

      anto74 Member

      anto74 @anto74 As i imagined....I have not figured out where to put the code :D
      I must find a particular file in my theme? i'm finding file similar to wp admin bar ...:)
       
  3. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    You can put in the theme functions.php (or similar name).
     
    anto74 likes this.
    1. anto74

      anto74 Member

      anto74 @xfrocks Thanks ! ;)
       
      xfrocks likes this.
      1
Loading...