- This topic has 12 replies, 3 voices, and was last updated 4 years ago by
Tom.
-
AuthorPosts
-
February 16, 2017 at 4:18 am #279607
David
Hello, I am designing a template and I have a problem.
I have had to change the position of the menus to put the secondary menu first, then a DIV for a slider and followed the main menu.
I have disabled the menus and then added these lines in the GPHook “After Header” to be able to have the desired menu settings:
<?php if ( function_exists( 'generate_secondary_navigation_position' ) ) generate_secondary_navigation_position(); ?> <div id="main-slider" class="main-slider"></div> <?php if ( function_exists( 'generate_navigation_position' ) ) generate_navigation_position(); ?>
But this happens:
As you can see, the main menu correctly acquires the color background settings in the customization screen but does not work well outside the customization screen.?¿
However, the secondary menu, presents no problems and loads correctly on both.
I have a child theme. No more modifications.
GeneratePress 1.3.44GP Premium 1.2.94February 16, 2017 at 7:57 am #279693Leo
StaffCustomer SupportHi Liz,
So I assume the changes don’t apply when you click save? What about changes in typography etc?
Are you using a caching plugin? I’m assuming you are working on a local host?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 16, 2017 at 8:43 am #279732David
Yes, I’m on localhost but I’ve recreated the problem online with a fresh install and it’s exactly the same.
I only have the plugins: WooCommerce and GP Premium
It looks like it has not loaded an stylesheet from some php function.
I followed
1º Activate GP Plugins: GP Hooks, Secondary nav
2º Create Main menu and secondary menu in WP.
3º In “WP -> Apperance -> Customize -> Layout” Primary and secondary = No navigation
4º In GP Hooks: I put the code of my first post.And the main menu style sheet disappears when I load the page normally.
February 16, 2017 at 8:48 am #279734Leo
StaffCustomer Supporthmm did you started your own child theme or you downloaded a blank one from here? https://docs.generatepress.com/article/using-child-theme/#installing-a-child-theme
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 16, 2017 at 8:57 am #279750David
I dowloaded the blank from the URL.
February 16, 2017 at 2:36 pm #279940Tom
Lead DeveloperLead DeveloperAny chance you can link me to the live site with the problem?
Also, why not use the built in navigation location options to place the secondary nav above the header, and the primary nav below the header? Then hook the slider into the header.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 20, 2017 at 10:15 am #281435David
I can show you the basic structure I need to create the whole shop, and the issue in the main menu:
If you need, I can send you an email with the user / pass to check for yourself.
February 20, 2017 at 10:33 am #281458Tom
Lead DeveloperLead DeveloperGP will only write the CSS for the navigation if it’s set to display. I’m assuming you have the Customizer option for the navigation set to “No Navigation”?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 20, 2017 at 10:54 am #281465David
Yes exactly, the main navigation is set: No Navigation.
February 20, 2017 at 12:26 pm #281505David
I fixed the problem.
I deactivated GPHooks, and then activated again primary menu and I’ve put the slider in header.php (in the child theme):
<?php do_action( 'generate_before_header' ); ?> <?php do_action( 'generate_header' ); ?> <div id="main-slider" class="main-slider"></div> <?php do_action( 'generate_after_header' ); ?>
So, I think this is the fast way to fix this xD.
February 20, 2017 at 4:33 pm #281624Tom
Lead DeveloperLead DeveloperWhy not just add your slider into the After Header hook in GP Hooks? That way you don’t need to overwrite the entire header file.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 21, 2017 at 3:11 am #281775David
Yes, is the first thing I did, but, if you recheck my online website, you will see that the primary menu is on top of the slider if I use the “After header” hook. Looks like the primary menu has priority always in the hook “After header”.
I was trying to change with css but I cant.
February 21, 2017 at 7:35 am #281901Tom
Lead DeveloperLead DeveloperWhat if you add the slider into the After Header Content hook?
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.