- This topic has 39 replies, 9 voices, and was last updated 7 years, 3 months ago by Leo.
-
AuthorPosts
-
July 24, 2016 at 12:02 am #212431TomLead DeveloperLead Developer
Ah, you want it on all blog pages.
Well maybe it would be easier to just remove it on pages?
add_action('after_setup_theme', 'remove_nav_exclude_blog_page'); function remove_nav_exclude_blog_page() { if ( is_page() ) remove_action('generate_after_header', 'generate_add_secondary_navigation_before_header'); }
August 9, 2016 at 6:06 pm #217027JonoThank you Tom, your solution adding PHP and CSS worked a treat for me. Handy for when using Secondary Nav for contact details.
– Jono
August 9, 2016 at 8:27 pm #217059TomLead DeveloperLead DeveloperAwesome, glad to hear it works π
August 29, 2016 at 3:14 am #222049KarimHey Tom,
Marvellous how to fix this. I was looking for this solution as well. I added the code in the simple php plugin and then the css. It did exactly what i want, but gave one tiny issue, and that is that a dropdown in the menu is suddenly pushed to the right of the menu, so out of the screen. If i remove the code again it goes nicely down as is default.
Take a look if you want on test.primemedia.nl
August 29, 2016 at 10:49 am #222217TomLead DeveloperLead DeveloperHi there,
Give this CSS a try:
@media (max-width: 768px) { .widget-area .secondary-navigation ul ul { position: relative; clear: both; left: 0; width: 100%; } }
August 29, 2016 at 1:33 pm #222256KarimWorked perfectly sir. Thanks alot:)
August 30, 2016 at 12:39 am #222349TomLead DeveloperLead DeveloperNo problem! π
February 23, 2017 at 2:57 am #282893DominikHi Tom,
Thanks for the easy theme! Hope you can help me:)
I want to keep my secondary nav open on mobile, without the toggle option. So that it just shows my social icons next to each other inline.
I tried the php and css code, but it looks like it doesn’t work. It hides my whole second menu.See my website here: https://goo.gl/aL5Ott
Thanks!
February 23, 2017 at 9:50 am #283078LeoStaffCustomer SupportHi Dominik,
Is this the code you tried? https://generatepress.com/forums/topic/secondary-navigation-on-mobile-question/#post-120014
I just tested and it’s working for me
Make sure you click “Save Changes and Activate” in Code Snippet.
Let me know.
February 23, 2017 at 12:18 pm #283154DominikHi Leo,
Thanks for you quick reply and solution.
It works! I didn’t click the activate button.
Thanks!February 23, 2017 at 12:22 pm #283157LeoStaffCustomer SupportYou’re welcome π
June 14, 2017 at 12:22 pm #333626JasonAfter adding the CSS via Customizer and then the PHP using both Code Snippets and as an individual plugin, I am still not getting any change with the secondary nav. Am I missing something???
Please help.
June 14, 2017 at 12:27 pm #333627LeoStaffCustomer SupportTry just using Code Snippets and make sure the snippet is activated.
Also make sure to clear cache if you are using a caching plugin.
If this still doesn’t work can you provide a link to your site?
June 14, 2017 at 12:40 pm #333629JasonOnly using Code Snippets.
Cache has been cleared.
Here’s the site: http://towtruck.wpengine.com/Thanks for your help in advance.
June 14, 2017 at 12:47 pm #333635LeoStaffCustomer SupportI don’t see the secondary menu toggle button which means the CSS is working which is good.
Tried the PHP here and it worked for me so just want to make sure this is what you added: https://generatepress.com/forums/topic/secondary-navigation-on-mobile-question/#post-120014
Also make sure you click Save Changes and Activate in the snippet.
-
AuthorPosts
- You must be logged in to reply to this topic.