- This topic has 16 replies, 6 voices, and was last updated 2 years, 12 months ago by
Daniele.
-
AuthorPosts
-
September 6, 2021 at 10:27 pm #1921138
Ian
I would like to add my logo that’s used as site-logo in the top nav to the off canvas panel above the links. How would I do this?
September 6, 2021 at 10:31 pm #1921143Elvin
StaffCustomer SupportHi Ian,
Can you provide a mockup image of how you want it to be laid out? To have a clearer idea for the CSS writeup (or PHP snippet if necessary)
September 6, 2021 at 10:36 pm #1921144Ian
Sure
September 6, 2021 at 10:51 pm #1921155Ian
Probably just add the logo down the bottom, like this.
September 7, 2021 at 12:46 am #1921243Elvin
StaffCustomer SupportThere are multiple ways of doing this but they all involve the use of
generate_after_slideout_navigationhook.If you simply want to use the logo assigned on the customizer settings, try this PHP snippet:
add_action('generate_after_slideout_navigation', 'generate_construct_logo' );Or if you want to design how the logo is laid out, you can create a Block Element, add your logo image on an image block, design your layout, and then hook the Block element to
generate_after_slideout_navigation.September 7, 2021 at 12:56 am #1921248Ian
I added this snippet
If you simply want to use the logo assigned on the customizer settings, try this PHP snippet:
Checked the off canvas menu and I can’t see it yet.
Do I have to assign in somehow in the customiser?
September 7, 2021 at 1:03 am #1921257Elvin
StaffCustomer SupportIt’s actually there, we just need to fix it with CSS.
Try this:
nav#generate-slideout-menu .site-logo{ display: block !important; } nav#generate-slideout-menu .site-logo img { width: 100%; height: auto; }September 7, 2021 at 1:48 am #1921329Ian
Excellent, thanks.
September 7, 2021 at 2:12 am #1921345Ian
So is there any way of changing its size? It’s really small. Or do I have to use the other method of creating a block to do that?
September 7, 2021 at 3:59 am #1921445David
StaffCustomer SupportHi there,
change Elvins CSS for this:
nav#generate-slideout-menu .site-logo { display: block !important; padding: 10px; } nav#generate-slideout-menu .site-logo img { width: 250px; height: auto; }It adds some padding, and you set an explicit width to the img
September 7, 2021 at 5:03 am #1921510Ian
Thanks David
September 7, 2021 at 5:23 am #1921532David
StaffCustomer SupportYou’re welcome
February 26, 2022 at 2:26 am #2134242Christoph
I have the same problem. But i want the logo before the Navigation.
?February 26, 2022 at 5:55 am #2134362David
StaffCustomer SupportHi there,
try using this PHP Snippet:
add_action('generate_before_slideout_navigation', 'generate_construct_logo' );May 18, 2022 at 2:32 am #2223386Matthias
Or if you want to design how the logo is laid out, you can create a Block Element, add your logo image on an image block, design your layout, and then hook the Block element to generate_after_slideout_navigation.
I’m trying the same – adding a logo (as home button) to the off canvas menu. An Element seems to be the easiest way to me (unless you would say it slows the page more then another solution).
So i tried to create an element, block type with hook, added a gb container with background image and show on whole page.
The “generate_after_slideout_navigation” hook doesnt seem to exist though. “after_slideout_navigation” is there – but so far i couldnt get this to show my element.Has this solution changed?
-
AuthorPosts
- You must be logged in to reply to this topic.