Archived topic
Problem with slide menu after update
14 replies · Started by Adam Zátopek on March 30, 2018
Hi Tom,
Maybe 1 year ago, you send me css for floating slide out menu. After last update I see problem with this solution. I cant use Burger Menu. Because when I click on Menu, url change to /#generate-slideout-menu and menu doesnt open.
#site-navigation { background: rgba(34, 34, 34, 0.8); }
.main-navigation { background: rgba(0,0,0,.4); position: fixed; }
.main-navigation:hover { background: rgba(0,0,0,.6); }
.main-navigation .main-nav ul .current-menu-item > a { background: rgba(0,0,0,.6); }
.main-navigation .main-nav ul li > a:hover { background: #222222; }
li.slideout-toggle.opened {display: none!important;}
.menu-toggle.opened {display: none!important;}
I dont know why items dont generate in menu.
Thank you for your help.
You have a couple javascript errors which are preventing it from working. The errors are happening because a couple GP elements aren't being added into your footer.
Are you using NextGen Gallery by chance? If not, can you try deactivating your plugins one by one to find the conflict?
Hi Tom,
yes I have NextGen Gallery.
I need to get in touch with them to see why their plugin is preventing our hooks.
Try this:
add_action( 'after_setup_theme', 'tu_fix_nextgen_issues' );
function tu_fix_nextgen_issues() {
remove_action( 'wp_footer', 'generate_slideout_navigation', 0 );
add_action( 'generate_before_footer', 'generate_slideout_navigation' );
remove_action( 'wp_footer', 'generate_back_to_top' );
add_action( 'generate_after_footer', 'generate_back_to_top' );
}
EDIT
As of GP 2.1, you only need to do this:
add_action( 'after_setup_theme', 'tu_fix_nextgen_issues' );
function tu_fix_nextgen_issues() {
remove_action( 'wp_footer', 'generate_slideout_navigation', 0 );
add_action( 'generate_before_footer', 'generate_slideout_navigation' );
}
Hello Tom,
added the snippet to several of my sites into the functions.php manually and the slideout nav is back. But the to top button is still gone away. The button comes back when I deactivate nextgen. Hope you find a way to come in contact with nextgen.
Best, Daniel // Didn't want to answer here...
Sorry about that - I just adjusted the code above to fix the back to top button as well.
Hi Tom,
thank you. This hotfix work. If you need help with support in nextgen forum, I can help you.
I'll open a topic with them tomorrow :)
Hi Tom,
Did you get any feedback from the Imagely team?
I didn't.
What I've done is add a new hook into GP 2.1, which should fix it.
Perfect.
Looking forward to the update.
Hello Tom,
this problem seems to be back in 2.1?
Best, Daniel
This issue never really went away, but it should be easier to "fix" now: https://generatepress.com/forums/topic/problem-with-slide-menu-after-update/#post-536764
I am in a multisite where several sites use other themes. Can I add this into a code snippet and network activate it? Or do I need an if-statement?
I would only add it to sites using GeneratePress.