[Support request] Svg menu icon bars fatter

Home Forums Support [Support request] Svg menu icon bars fatter

Home Forums Support Svg menu icon bars fatter

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1520118
    Juan Jose

    I want to make the svg menu icon bars fatter in mobile, how can I do that?

    My web is https://tusredactores.com

    Thanks

    #1520120
    Juan Jose

    svg menu icon bars now
    svg menu icon bars fatter (I want this)

    #1520827
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You can replace the bars SVG with your own using a filter:

    add_filter( 'generate_svg_icon_element', function( $output, $icon ) {
        if ( 'menu-bars' === $icon ) {
            $output = 'YOUR SVG HTML HERE';
        }
    
        return $output;
    }, 10, 2 );

    Hope this helps 🙂

    #1520947
    Juan Jose

    Now the “X” that had disappeared, how can I load an “svg” when the menu is open?

    #1520949
    Juan Jose

    #1520956
    Leo
    Staff
    Customer Support

    Can you copy and paste the code you are adding here?

    Please make sure to click the CODE button in the editor.

    #1520962
    Juan Jose
    add_filter( 'generate_svg_icon_element', function( $output, $icon ) {
        if ( 'menu-bars' === $icon ) {
            $output = '<svg viewBox="0 0 100 80" width="40" height="40">
      <rect width="100" height="20"></rect>
      <rect y="30" width="100" height="20"></rect>
      <rect y="60" width="100" height="20"></rect>
    </svg>';
        }
    
        return $output;
    }, 10, 2 );

    The svg icon changes, but when I open the menu it disappears.


    #1521056
    Tom
    Lead Developer
    Lead Developer

    Is there any way we can see this issue on the site? I’m still seeing the old icon.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.