Archived topic
change slideout exit icon
5 replies · Started by Rodrigo on April 7, 2020
Viewing posts 1–6 of 6
Hello,
How can I change the slideout exit icon (X) with a custom SVG image?
Thanks in advance
Hi there,
Are you using font icons or SVG icons in "Customize > General"?
Let me know :)
I'm using SVG icons.
You could try this:
add_filter( 'generate_svg_icon, function( $output, $icon ) {
if ( 'pro-close' === $icon ) {
$svg = 'Your SVG HTML';
}
if ( $svg ) {
$output = sprint(
'<span class="gp-icon %1$s">
%2$s
</span>',
$icon,
$svg
);
}
return $output;
}, 15, 2 );
I added this code and it breaks my site. What does that 15, 2 means?
15 is the priority of the function, and 2 is the number of the arguments required by the filter.
Where did you add the code ? And what error did it produce?
This archived topic is closed to new replies.