Adding adminbar hover to theme navigation bar

Home Forums Gwangi – Dating & Matchmaking Community Theme Fine Tuning Child Themes Adding adminbar hover to theme navigation bar

This topic contains 5 replies, has 3 voices, and was last updated by  Jason 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6116

    Surrealer
    Participant
    • 25 Posts
    @surrealer

    Hello,
    I want to add the adminbar profile hover (screen 1) to the navigation of the theme (screen 2), so I edit all css parts,
    but I don’t find a way to add anything to the navigation bar at all.
    Where is the navigation menu generated for the child themes?

    I tried to edit gwangi\inc\template-functions.php on line 74 / 75, because it looks like there is the navbar__container generated,
    but all changes in there have no result. Is it generated somewhere in the grimlock plugin?

    Please give me a hint.

    #6163

    Jean-Pascal
    Participant
    • 78 Posts
    @themopteryx

    Hi @surrealer,

    You can add menu items directly to the “logged-in” menu via the WP edit menu screen.
    With some custom links and BP dynamic links you can easily recreate this menu.

    Or maybe I misunderstand this question?

    Regards,

    #6171

    Surrealer
    Participant
    • 25 Posts
    @surrealer

    Hi @themopteryx
    I try to find where the profile picture in the navigation bar is generated,
    so that I can edit it.
    the profile picture you can see with a red circle in my screenshot: admin-bar-hover2

    #6180

    Jason
    Participant
    • 127 Posts
    @themoceratops

    Hi @surrealer,

    The gwangi_header function located in gwangi/inc/template-functions.php is only a fallback in case the Grimlock plugin is disabled, which is why changes in that file have no effect on the site.

    If you are looking to directly edit the template responsible for the part of the navigation show on your screenshot, you will find it in the gwangi/inc/grimlock-buddypress/component/class-gwangi-grimlock-buddypress-navbar-nav-menu-component.php file, in the render function (which should begin around line 67). However please note that we don’t recommend modifying those files as you will lose your modifications if you update the theme later. And even if you create a child theme, be aware that overriding this component in a child theme requires advanced PHP knowledge; it will not work if you just copy that file in a child theme.

    But if you just want to add new items to the hover menu, it’s a lot easier: just go to Appearance > Menu, then edit the “User – Logged In” menu.

    Hope this information helps you.

    Best regards,

    #6207

    Surrealer
    Participant
    • 25 Posts
    @surrealer

    But if you just want to add new items to the hover menu, it’s a lot easier: just go to Appearance > Menu, then edit the “User – Logged In” menu.

    Oh I thought it is only a differt kind of display for the main objects, thank you, still it doesnt work with sub menus, because it’s cutting off to the right and creating a scroll bar at the bottom:

    #6212

    Jason
    Participant
    • 127 Posts
    @themoceratops

    Hi @surrealer,

    Since this can easily be resolved with a little bit of CSS, I will provide you with the following CSS snippet:

    .navbar-nav--buddypress .sub-menu .sub-menu {
       left: calc(-100% - 20px) !important;
    }
    
    .navbar-nav--buddypress .sub-menu .sub-menu:before {
       left: auto !important;
       right: -18px !important;
       width: 18px !important;
    }

    If you need to find out how to add custom CSS to your site, we recommend that you visit this article of our documentation:

    Adding Custom CSS

    Best regards,

Hi there,

This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!

Best regards,
The Themosaurus team.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Adding adminbar hover to theme navigation bar’ is closed to new replies.