Find Answers and Get Support › Forums › Gwangi – PRO Multi-Purpose Membership, Social Network & BuddyPress Community Theme › Fine Tuning › Child Themes › Adding adminbar hover to theme navigation bar
- This topic has 5 replies, 3 voices, and was last updated 5 years, 10 months ago by
Jason.
-
AuthorPosts
-
SurrealerParticipant@surrealer
- 16 Topics
- 47 Posts
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.
April 8, 2019 at 15:06 #6116@themopteryx- 0 Topics
- 615 Posts
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,
April 9, 2019 at 16:12 #6163SurrealerParticipant@surrealer- 16 Topics
- 47 Posts
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-hover2April 10, 2019 at 00:18 #6171@themoceratops- 1 Topics
- 430 Posts
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,
April 10, 2019 at 14:33 #6180SurrealerParticipant@surrealer- 16 Topics
- 47 Posts
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:
April 11, 2019 at 11:46 #6207@themoceratops- 1 Topics
- 430 Posts
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:
Best regards,
April 11, 2019 at 16:42 #6212 -
AuthorPosts
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.
The topic ‘Adding adminbar hover to theme navigation bar’ is closed to new replies.