Site logo

Archived topic

Appending extra content alongside the navigation bar

5 replies · Started by Richard Bland on August 3, 2015

Viewing posts 1–6 of 6

Morning Tom,

I've had a client query which I know I can solve with some additional coding into the header, but I wondered if there was a way of adding some content alongside the navigation bar which is currently set to float to the right at the top of the page.

What I'd ideally like to do is to add in a couple of language flags 'buttons' for translation, but have them sit within or alongside the main navigation bar.

Any ideas on this one?

I know if I go into the header php file I can alter the grid containers and add in another container to house this content, effectively pushing the nav bar to the left a bit, but when it is responsive it will look a little odd.

How would you go about adding in these additional buttons to the top right of the site, where the main navigation bar is currently sitting?

Hi Richard,

There's a hook inside the navigation you can use: generate_inside_navigation

So it would be something like:

add_action( 'generate_inside_navigation','generate_insert_into_navigation' );
function generate insert_into_navigation()
{ ?>
      Put your HTML or whatever in here
<?php }

Let me know if that works or not :)

I will give it a try in a moment. I am working on the site as we speak. Cheers buddy.

Cool - I'm off to bed (12:30AM). Will check back in the morning :)

Is this a hook from the GP Hooks add on or do I need to put this function in somewhere else? I can't see a GP Hook called inside navigation... ;-^

This archived topic is closed to new replies.