• Hello! I want to change the icon used for the shopping cart on my header into a custom SVG icon.

    I tried following the steps written over here on how to change an icon to a different custom icon, but it doesn’t seem to work. I’m using a child theme instead of a code snipet plugin and I’m assuming that this code:

    add_filter( 'kadence_svg_icon', 'change_cart_icon', 10, 4 ); function change_cart_icon( $output, $icon, $icon_title, $base ) { if ( 'shopping-cart' === $icon ) { return '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 19.5c0 .829-.672 1.5-1.5 1.5s-1.5-.671-1.5-1.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5zm3.5-1.5c-.828 0-1.5.671-1.5 1.5s.672 1.5 1.5 1.5 1.5-.671 1.5-1.5c0-.828-.672-1.5-1.5-1.5zm1.336-5l1.977-7h-16.813l2.938 7h11.898zm4.969-10l-3.432 12h-12.597l.839 2h13.239l3.474-12h1.929l.743-2h-4.195z"/></svg>'; } return $output; }

    Should be placed in my child theme’s function.php file. I’ve double checked the svg class to make sure that it is already correct, but it doesn’t work.

  • You must be logged in to reply to this topic.