[Resolved] Top bar below nav menu

Home Forums Support [Resolved] Top bar below nav menu

Home Forums Support Top bar below nav menu

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #463657

    Hi Tom,

    The “top bar” seems to be rather unloved, when you compare it with the rest of GP, and plugins which do a similar job. Do you plan to add additional functionality, location or customisation possibilities in the near future?

    Also, to use the GP top bar I need to move it to below the primary navigation. Is that easily achieved? I couldn’t find any reference to moving it.

    GeneratePress 2.0.1
    GP Premium 1.5.6
    Customer Support

    Hi there,

    What specific features are you looking for?

    Usually top bar stays at the top of the page. What are you trying to add? Maybe we can try Hooks solution.

    Let me know πŸ™‚


    Hi Leo,

    The two key features I need are A) the ability to relocate the Top Bar below the primary navigation, and B) a way to include a link (to a sign-up/opt-in page), using a prominent and clickable button.

    There are several Top Bar opt-in plugins in the repository, but I don’t think it should be necessary to use a plugin for just this, as it would seem to me that all the necessary functions must be there.

    Somewhere. πŸ™‚

    Customer Support

    A) What about using the secondary navigation?

    B) Secondary navigation can also do that. If not GP hooks should help as well:

    People generally want top bar at the top of the page. We haven’t really received any requests from other users on adding extra features in top bar.

    If you can show me what you would like to achieve, I might be able to provide better suggestions πŸ™‚


    As I have explained the type of content I want to use, I clearly don’t want menu in that location.

    Can you please explain to me, ideally with a code snippet example, how to use GP hooks to move the top bar specifically, down to below the primary navigation?

    Customer Support

    We wouldn’t use GP hooks to use top bar.

    GP hooks allows you to add content throughout the theme.

    What if you add the content you want into After Header hook?

    It would show up below the navigation.


    The problem I see with using the secondary navigation is that I want to change the background colour to denote a change of category so let me take a look at using the after-header hook and see what I can come up with.

    Lead Developer
    Lead Developer

    The secondary navigation would do that – the menu item would get a current class and change colors if you’re on that page. The top bar wouldn’t achieve that.

    The top bar itself likely doesn’t need a location option, as it’s the top bar and is used at the top of the page.

    That being said, we can always move things around with a function:

    add_action( 'after_setup_theme', 'tu_move_top_bar' );
    function tu_move_top_bar() {
        remove_action( 'generate_before_header', 'generate_top_bar', 5 );
        add_action( 'generate_after_header', 'generate_top_bar', 6 );

    I am beginning to see the light Tom.

    Thank you for that, and even if I don’t use the Top Bar on this occasion, I have at least learned, in principle, how to move things around with a function.

    Many thanks,


    Lead Developer
    Lead Developer
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.