Site logo

Archived topic

Off-Canvas-Panel - Not working

14 replies · Started by Raul on January 28, 2021

Viewing posts 1–15 of 15

Hi,
I added the theme also to other site and on both other sites Off-Canvas-Panel is no9t showing. For example outcastzone.de ... It's activated for Desktop

And on my second page if I visit the site with mobile phone and click on menue and get the Off-Canvas-Panel ???

What happent? I reinstalled everything but no Off-Canvas Panel visible. And on one of my sites I have on a tablet 2 menues, Off-Canvas-Panel and Primary but if I click both both shows me Canvas manue?

Oh, or wait. Maybe on pcpointer.de I have a problem. The Off-Canvas-Panel is not sliding up, it is on my footer at the bottom of my site! Why?

I fixed that issue caused by NextGen Gallery with

add_action( 'after_setup_theme', 'tu_move_slideout_navigation' );
function tu_move_slideout_navigation() {
    remove_action( 'wp_footer', 'generate_slideout_navigation', 0 );
    add_action( 'generate_before_footer', 'generate_slideout_navigation' );
}

I checked that site and the Off Canvas is working correctly as i see it on Desktop ?

Yes, I fixed it with the code from my last reply ;) thanks

Glad to hear that

Glad I came across this post. It was driving me crazy!! I was using NextGen gallery too and had the same problem with the off canvas panel not showing up on mobile, and showing up below the footer on desktop. I deactivated the NextGen plugin and now everything works.

Can I ask what file did you add that piece of code to?
Edit: think I found it...theme-functions.php? Seems to be working now!

Yes. You only have to add the code above into the functions.php.

Hi Maura,

Here's how you can add PHP snippets:
https://docs.generatepress.com/article/adding-php/

It's either Code snippets plugin or a Child theme's functions.php.

We don't recommend using the parent theme's functions.php as any changes you do in this file will be wiped when you update the theme.

Ah ok, thank you! I'll look into putting it there instead then.

Hello again, so the above code was working well for me thus far...then I decided to turn my "Blog" page on again, added it to my menu, and whenever I try to go to my blog page I get this error:

Fatal error: Cannot redeclare tu_move_slideout_navigation() (previously declared in /home/gryphonm/sylvanmistart.com/wp-content/plugins/code-snippets/php/snippet-ops.php(446) : eval()'d code:3) in /home/gryphonm/sylvanmistart.com/wp-content/themes/generatepress/index.php on line 66

If I turn the code off (I added it to the code snippets plugin), it will work.
It seems to only be the blog page, no other page this happens to.

Any ideas?

Hi Maura,

you originally added the snippet to your themes functions.php - can you make sure it was removed from there.

Ah, thanks for the tip! It wasn't in functions.php, but I did find it in index.php. I tried it in a few places before I found where it worked and I must have forgot to hit save after "removing" it. Ughh...lol... thank you!

It's working now.

Glad to hear that!

This archived topic is closed to new replies.