Archived topic
Off canvas panel not showing up
26 replies · Started by Antonio on August 2, 2022
Hello,
button to open the offcanvas panel is not showing up on the site (still, I can see the id="generate-slideout-menu" element in the html code).
The site is actually running on a local machine. Please let me know how to get support on this.
Thank you
Hi there,
We have not had any other reports on this so it's not possible to debug without seeing the issue live.
Have you tried #1 here?
https://docs.generatepress.com/article/debugging-tips/
Hello,
I deactivated all plugins, except GP Premium, and enabled Debug.
I get this error on frontend:
Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in C:\xampp\htdocs\grani\wp-includes\functions.wp-styles.php on line 90
And this error on backend:
null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\grani\wp-includes\formatting.php on line 2772
Active theme is GeneratePress Child (the one available on your website).
WP version is 6.0.1. PHP Version: 8.1.6
Thank you
Does the issue occur if you activate the parent theme?
Yes, same both on frontend and backend.
Thank you
Are you able to start a staging site for us to take a look from the backend?
We have not had any other reports on this and are unable to replicate the issue.
Thanks!
Unfortunately I don't have an hosting for the moment. I can send you a backup of the site.
Let me know.
Can we revisit the issue once you have a hosting set up?
Thanks.
Ok, let's try.
Hello,
site is online now.
Please check.
Thank you
Can you disable this element for now?
https://www.screencast.com/t/qPcwROwO
Done. I can see the menu button now.
But still I need to keep that element. What do you suggest to do?
Thank you
What is the desired header layout you are trying to achieve?
Do you want the primary navigation showing?
Using the Site Header element replaces the entire site header which is currently where the navigation is located.
Hello,
I want to open the full screen menu when clicking on the symbol indicated here: https://prnt.sc/67o2q3XgoTo_
Thank you
Hi Antonio,
Activate the Off canvas menu on Mobile.
Then, add this snippet:
add_filter( 'generate_svg_icon', function( $output, $icon ) {
if ( 'menu-bars' === $icon ) {
$svg = 'add your <svg>...</svg> here';
return sprintf(
'<span class="gp-icon %1$s">
%2$s
</span>',
$icon,
$svg
);
}
return $output;
}, 15, 2 );
Adding PHP reference: https://docs.generatepress.com/article/adding-php/#code-snippets
Replace add your <svg>...</svg> here with your SVG code.