- This topic has 5 replies, 2 voices, and was last updated 7 years ago by
Tom.
-
AuthorPosts
-
August 3, 2015 at 11:19 pm #126192
Richard Bland
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?
Kind Regards,
Richard Bland
Owner, BhambraBland
--
w: www.bhambrabland.co.uk
e: richard@bhambrabland.co.uk
--August 3, 2015 at 11:59 pm #126202Tom
Lead DeveloperLead DeveloperHi 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 ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 4, 2015 at 12:15 am #126221Richard Bland
I will give it a try in a moment. I am working on the site as we speak. Cheers buddy.
Kind Regards,
Richard Bland
Owner, BhambraBland
--
w: www.bhambrabland.co.uk
e: richard@bhambrabland.co.uk
--August 4, 2015 at 12:31 am #126225Tom
Lead DeveloperLead DeveloperCool – I’m off to bed (12:30AM). Will check back in the morning ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 4, 2015 at 12:38 am #126227Richard Bland
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… ;-^
Kind Regards,
Richard Bland
Owner, BhambraBland
--
w: www.bhambrabland.co.uk
e: richard@bhambrabland.co.uk
--August 4, 2015 at 7:55 am #126343Tom
Lead DeveloperLead DeveloperThat hook isn’t in GP Hooks yet, so you need to add it as a function: https://generatepress.com/knowledgebase/adding-php-functions/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.