Site logo

Archived topic

Change icon in off canvas

1 reply · Started by jose on April 14, 2022

Viewing posts 1–2 of 2

How can I change the off canvas exit icon?

Hi Jose,

If you have the Close Button of the Off canvas menu to appear Inside in Appearance > Customize > Layout > Off Canvas Panel, you may add a PHP snippet like this to alter it:

add_filter( 'generate_close_slideout_navigation_button', function() {
    return sprintf(
				'<button class="slideout-exit %2$s">%1$s</button>',
				'YOUR CUSTOM HTML HERE',
				'has-svg-icon'
			);
} );

Kindly replace YOUR CUSTOM HTML HERE with your HTML.

Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets

Adding it through Code Snippets should work.

Hope this clarifies. Kindly let us know how it goes. :)

This archived topic is closed to new replies.