[Resolved] How to have a different navigation for home page?

Home Forums Support [Resolved] How to have a different navigation for home page?

Home Forums Support How to have a different navigation for home page?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #239536
    K Saravana

    Hello!

    I have installed GP theme and recently purchased the premium add-ons and am setting up my website.

    Could you please help me with this query. I need a different primary navigation for the home page. I want the home page menu to be floating right, while the menu on the rest of pages to be available below the header. Is it possible?

    Thanks

    K S Baskar

    #239566
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That’s actually a really tough question as it’s very hard to change options on specific pages only unless a filter is present. In this case, there’s no filter.

    Let me think about this and I’ll get back to you ๐Ÿ™‚

    #239692
    Tom
    Lead Developer
    Lead Developer

    Alright, I was coming up with all of these complicated ways of doing this, and decided I should just add a filter to the theme to make it easy.

    So in, GP 1.3.41, you’ll be able to do this:

    add_filter( 'generate_navigation_location','tu_move_navigation' );
    function tu_move_navigation( $location )
    {
    	if ( is_front_page() ) 
    		return 'nav-float-right';
    	
    	return $location;
    }

    If you don’t want to wait for 1.3.41, you can grab the latest files on GitHub: https://github.com/tomusborne/GeneratePress

    #239791
    K Saravana

    Hello Tom

    Thank you very much for adding the filter.

    K S Baskar

    #239794
    Tom
    Lead Developer
    Lead Developer

    Thanks for the push – been wanting to do that for a while now ๐Ÿ™‚

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