Site logo

[Support request] Not Show Logo Svg inline

Home Forums Support [Support request] Not Show Logo Svg inline

Home Forums Support Not Show Logo Svg inline

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1652826
    JOSE

    I try to put a inline svg logo but I don’t get it. Only show a space in white.
    I put in the functions.php file this code:

    add_filter( 'generate_logo_output', function() {
        return sprintf( // WPCS: XSS ok, sanitization ok.
            '<div class="site-logo">
                <a href="%1$s" title="%2$s" rel="home">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1233 1230"><path d="M154.6 1.2c-.2.7-.7 3.8-1 6.8s-.8 6.4-1.1 7.6c-.6 1.9-.1 2.1 13 3.1 7.4.5 13.7 1.2 13.9 1.4s-2 23.1-5 50.9c-2.9 27.8-5.3 51.7-5.4 53.1 0 2.6.2 2.7 8.1 3.4 4.4.4 8.2.5 8.5.2.2-.2 2.9-24 6-52.8 3-28.8 5.7-52.5 5.9-52.8.8-.7 35.1 3.9 59 7.9 39.6 6.7 41.5 7.1 41.5 9 0 1-4.7 23.9-10.5 51-5.8 27.2-10.5 50.1-10.5 51.1 0 1.7 1.9 2.3 13 4.4l3.5.6 10.9-51.3c6-28.2 11.1-51.8 11.5-52.4 1-1.7 51.9 10.9 86.1 21.4 10.2 3.1 12.4 4.1 12.2 5.6-.2.9-7.5 23.8-16.3 50.8-8.7 27-15.9 49.2-15.9 49.3 0 .5 16.1 5.7 16.5 5.4.1-.2 7.6-23 16.6-50.7 11-33.8 16.8-50.2 17.7-50.2 4.7 0 90.5 32.9 93.4 35.8.5.5-7.6 20.1-19.3 46.3-11.1 25-20.8 46.9-21.6 48.7l-1.4 3.3 7.7 3.5c4.3 1.9 8 3.1 8.4 2.7s10.4-22.4 22.1-48.9l21.4-48.1 4.5 2c14.5 6.2 65.7 32.4 82.7 42.3l4.1 2.4-24.9 43.1c-13.7 23.7-24.9 43.3-24.9 43.4 0 .7 13.2 8.5 14.3 8.5.7 0 10.2-15.7 21.2-34.8 10.9-19.1 22.1-38.4 24.8-43l4.9-8.3 5.6 3.3c16.5 9.4 70.3 44.6 80 52.3.1.1-13.6 19.3-30.6 42.6-16.9 23.3-31.1 42.9-31.5 43.5-.6 1.1 11.3 10.4 13.3 10.4.5 0 14.7-19 31.6-42.3 16.8-23.2 30.9-42.5 31.3-42.9 1.1-1.2 37 26.8 63.1 49.2 7.4 6.3 14.3 12.2 15.3 13 1.6 1.4-.6 4.1-33.8 41-19.5 21.7-35.4 39.9-35.3 40.5.2.5 2.9 3.4 6.1 6.4 5 4.7 6 5.3 7.2 4 .7-.8 16.7-18.5 35.5-39.4s34.5-38.1 34.9-38.3c2.3-.8 72.7 69.6 71.9 71.9-.2.4-17.4 16.1-38.3 34.9s-38.6 34.7-39.3 35.5c-1.2 1-.5 2.2 3.9 7.1 2.9 3.3 5.8 6 6.3 6.2.6.1 18.9-15.8 40.6-35.3 36.9-33.2 39.6-35.4 41-33.8.8 1 6.7 7.9 13 15.3 22.1 25.8 50.4 62.1 49.2 63.1-.4.4-19.7 14.5-42.9 31.3C925 529.3 906 543.5 906 544c0 2 9.3 13.9 10.4 13.3.6-.4 20.2-14.6 43.5-31.5l42.4-30.8 3.4 4.7c9.1 12.8 19.7 28.9 39.8 60 7.3 11.4 8.7 15.3 5.4 15.3-.6 0-3 1.3-5.4 3-2.4 1.6-4.6 3-5 3-.3 0-2.9 1.6-5.8 3.5-2.8 1.9-5.6 3.5-6.1 3.5-.4 0-3 1.6-5.7 3.6s-4.9 3.3-4.9 3c0-.4-2.5 1-5.5 2.9-12.8 8.2-16.1 10.2-17.5 10.7-.8.3-5.5 3.1-10.4 6.2-5 3.1-9.4 5.6-9.8 5.6s-2.9 1.5-5.5 3.3c-2.7 1.9-5.6 3.7-6.6 4-1.7.6-1.7.8 0 3.4.9 1.6 2.8 4.2 4.1 6 1.3 1.7 2.2 3.5 2 3.9s.5 1.2 1.4 1.7c1.3.9 2.9.3 7.6-2.6 3.3-2 6.3-3.7 6.7-3.7s2.8-1.5 5.4-3.3c2.5-1.7 5.2-3.3 6-3.5.7-.1 2.7-1.3 4.5-2.6 1.7-1.3 4.9-3.4 7.1-4.6 4.4-2.4 6.8-3.8 20.6-12.2 5.2-3.1 9.7-5.6 10-5.5.4.1 1.5-.5 2.5-1.4 2.2-1.9 14.4-9.5 19.4-12l3.5-1.7 2.4 4.2c1.3 2.2 3.5 6.3 5 9.1 1.5 2.7 3.3 6.1 4 7.5.8 1.4 1.9 3.4 2.5 4.5.5 1.1 3.4 6.5 6.4 12 5.8 10.9 24.7 49.2 27.9 56.5l2 4.6-48.1 21.3c-26.5 11.7-48.5 21.7-48.9 22.1s.8 4.1 2.7 8.4l3.5 7.7 3.3-1.4c1.8-.8 23.7-10.5 48.7-21.6 26.2-11.7 45.8-19.8 46.3-19.3 2.9 2.9 35.8 88.7 35.8 93.4 0 1-15.8 6.6-50.2 17.7-27.7 9-50.5 16.5-50.7 16.6-.4.4 4.9 16.5 5.4 16.5.2 0 22.5-7.2 49.5-16 27.1-8.8 49.9-16.1 50.8-16.2 1.2-.2 2.5 2.5 5.4 12.2 10.5 34.2 23.1 85.1 21.4 86.1-.6.4-24 5.5-52.1 11.4-28 6-51.2 10.9-51.3 11.1-.2.1.4 3.9 1.3 8.3 1.4 6.2 2.2 8.1 3.5 8.1.9 0 23.8-4.7 51-10.5 27.1-5.8 50-10.5 51-10.5 1.9 0 2.3 1.9 9 41.5 4.1 24.4 8.6 58.2 7.8 59-.2.2-24 2.9-52.7 5.9-28.8 3.1-52.6 5.8-52.8 6-.3.3-.2 4.1.2 8.5.7 7.9.8 8.1 3.4 8.1 1.4-.1 25.3-2.5 53.1-5.4 27.8-3 50.7-5.3 50.9-5.1.5.6 2.9 30.4 4 51 .7 13 .7 19.1 0 19.6-.6.3-.9 2.1-.7 4l.3 3.4 9.3.3 9.2.3v-10.4c0-10.5-2.2-46.7-4-65.7-14.7-154.1-57-297-128.6-433.7-4.8-9.2-8.8-17.5-8.9-18.4-.1-.8-1.6-3.6-3.3-6.1-1.8-2.6-3.2-4.9-3.2-5.3 0-.3-2.7-5-6-10.5s-6-10.2-6-10.4c0-.3-2.4-4.3-5.3-8.8-3-4.6-5.6-8.8-5.8-9.3-.4-1.1-28.4-42.9-35.7-53.5C943.8 379.8 840.6 277.8 722 197.5 614.8 124.8 498.7 71.4 374.5 37.6c-65.2-17.7-143-31.5-204-36.1-4.4-.3-9.7-.8-11.7-1.1-2.7-.4-3.9-.2-4.2.8z"/><path d="M0 48.5C0 52.9.1 53 3.3 53c5.2 0 10.6 1.9 14 5l3.2 2.8v52.9c0 48.6-.1 53.1-1.7 55.5-2 3.1-7 4.8-14 4.8H0v9h42.4c45.5 0 50.7-.4 65.5-5.5 12.1-4.1 19-8.3 27.6-17 9.2-9.1 14.5-18.2 17.1-29.1 2.3-9.7 1.5-31.3-1.5-40.4-7.3-23-27.4-39.5-54.5-45.1-8.1-1.7-14-1.9-52.8-1.9H0v4.5zm87.5 8.9c11.5 5.7 19.7 17 24.2 33.6 2.5 9.2 2.5 39.4 0 49.5-3.8 14.9-10.3 24.2-20.5 29.2-4.7 2.3-7.3 2.8-15.2 3.1-8.7.3-9.8.2-13-2-7.2-4.8-7-3-7-63.2V53.8l12.8.3c11.7.4 13.2.6 18.7 3.3z" fill="red"/><path d="M574.1 261.7c-9.6 5-10.6 18.2-2 24.6 3.8 2.8 10.6 3.2 14.8 1 9.6-5 10.6-18.2 2-24.6-3.8-2.8-10.6-3.2-14.8-1zM63 284.9c-23.2 7.5-36.1 25-36.3 49.1-.1 26.4 13.1 44.2 37.8 50.5 8.2 2.1 27.2 2.1 34.5-.1 3-.9 8.2-3 11.5-4.7 6.2-3.3 17-13.2 19.4-18 1.3-2.5 1.3-2.9-.5-4.2-5.5-4.1-5.5-4.1-13 3.3-8.3 8.1-13.2 10.2-23.8 10.2-11.2 0-20.1-5.1-24.7-14.2-2.7-5.4-4.9-14.4-4.9-20.5V331h66v-2.3c0-7.2-2.2-19.5-4.3-24-4.6-10-15.3-18-27.5-20.6-8.4-1.7-27.7-1.3-34.2.8zm22.9 8.7c3.7 3 5.7 9.3 6.7 20.6l.6 7.8H62.7l.6-7.3c.8-9.5 3.2-16.1 7.4-20.3 4.4-4.5 10.5-4.8 15.2-.8zM557.8 317.4c-8 7.6-17.2 10.7-34.5 11.5-.9.1-1.3 1.8-1.3 5.1v5h25.1l-.3 32.8c-.3 36.1-.2 35.2-6.5 37.9-1.8.7-6.7 1.6-10.8 2l-7.5.6V420h82v-4c0-3.8-.1-4-3.2-4-6.6 0-15.2-2.7-17.6-5.5l-2.3-2.7.3-45.9.3-45.9h-9l-9 .1-5.7 5.3zM26.3 433.3l-16.3 1v4.3c0 4.1.2 4.4 2.8 4.4 4.9.1 10.7 3.4 12.6 7.4 1.6 3.4 1.7 8.8 1.5 69.9l-.2 66.1 2.9 1.2c2.7 1.1 3.2.9 9.7-5.2l6.9-6.3 3.6 2.4c12.1 8 38.2 10.2 53.5 4.5 11.7-4.4 23.3-15.9 27.6-27.5 5.7-15.3 4.9-34.3-2-49.1-4.1-8.8-10.7-15.7-18.7-19.6-5.9-2.9-7.7-3.3-16.8-3.6-12.3-.5-17.6 1-27 7.4L60 495v-63l-8.7.2c-4.9.1-16.1.6-25 1.1zm58.5 68.1c9 4.7 13.6 17.2 13.5 36.6-.1 18.6-4.6 32.4-12.3 37.6-2.6 1.8-4.8 2.4-9.2 2.4-6.8 0-10.6-2.6-14.3-10.1-2.5-4.8-2.5-5.1-2.5-32.7v-27.8l2.8-2.7c1.5-1.4 3.8-3 5.2-3.6 3.7-1.5 13.7-1.3 16.8.3zM832.2 624c-24.4 6.4-36.2 26.2-23.8 39.7 3.7 4.1 8.4 5.3 16 4.1 12.4-1.9 16.4-11.4 11.7-28l-1.9-6.6 2.1-.6c1.2-.3 5-.6 8.5-.6 13.5 0 20.5 7.6 20.4 22.5 0 7.7-1.6 12.5-5.8 17.4-3.4 4.1-8.1 7.3-23.9 16.1-13 7.2-19.8 11.8-28.7 19.4l-4.8 4.1V730h107v-27h-40.7c-40.5 0-40.8-.1-38.3-2 3.7-2.8 16.5-7.4 33.4-12 17.1-4.6 25.3-8.2 31.8-13.9 5.9-5.3 8-10.5 8-20.1.1-17.4-9.3-26.9-31.2-31.6-9.8-2.1-30.8-1.7-39.8.6zM942.1 633.7c-9.6 5-10.6 18.2-2 24.6 3.8 2.8 10.6 3.2 14.8 1 9.6-5 10.6-18.2 2-24.6-3.8-2.8-10.6-3.2-14.8-1zM54.3 684.9C37.6 689.4 29 696.7 29 706.1c0 9.5 5.8 14.1 17.6 14S63 716.5 63 707.5c0-2.7-.5-6.7-1.1-8.9-1.5-5.4.2-6.9 8.6-7.4 6-.4 6.6-.3 9.4 2.5 3.7 3.8 5.1 8.8 5.1 18.9v8.1l-4.2 1.6c-2.4.9-11 3.7-19.3 6.2-25.4 7.9-32.7 12.6-35.9 23.6-3 10-1.5 18.5 4.5 25.3 5.6 6.3 11.8 8.7 23 8.7 13.1 0 21.1-2.7 28.7-9.5l3.7-3.4 2.5 3.9c1.6 2.6 4.2 4.8 7.6 6.5 4.4 2.1 6.4 2.5 15 2.5 8.8-.1 13.1-.8 22.7-3.8 1.3-.4 1.7-1.6 1.7-4.9V773h-5.7c-11.4-.1-11.5-.7-11.1-36.3.3-33.8-.2-36.7-7.7-44.2-7-7.1-13-8.8-32.5-9.2-13.9-.2-17.6 0-23.7 1.6zM85 746.2c0 8.4-.4 15.8-.8 16.4s-2.5 2.3-4.6 3.8c-5.5 3.7-12.4 3.6-16.7-.2-5.7-5.1-4.9-17.7 1.5-24.3 2.6-2.7 17.4-10.8 19.9-10.9.4 0 .7 6.9.7 15.2zM66.5 834.3c-12.6 7.1-12.4 24.5.3 31.5 6 3.3 14.8 3.2 20.7-.2 12.2-7.2 12.2-24 .1-31.1-5.8-3.4-15.3-3.5-21.1-.2zM60.8 886.3l-16.8 1v8.4l4.5.6c6.1.9 10.2 3.1 12.5 7 1.9 3 2 5.3 2 46.7 0 23.9-.5 46.8-1 50.7-.8 6.4-4.1 15.3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2 1.3c2.8.6 6.2 1.9 7.5 2.8 5.3 3.4 5.3 3.8 5.3 65.3v57l-2.3 2.7c-1.8 2.1-3.5 2.8-7.5 3.2l-5.2.5v8.7h63v-4.5c0-4.2-.2-4.5-2.5-4.5-3.9 0-10.5-3.8-11.5-6.6-.6-1.5-1-29.1-1-69.5V1022l-9.2.2c-5.1.1-16.6.6-25.5 1.1zM1070.5 1024.3c-12.6 7.1-12.4 24.5.3 31.5 6 3.3 14.8 3.2 20.7-.2 12.2-7.2 12.2-24 .1-31.1-5.8-3.4-15.3-3.5-21.1-.2z"/><path d="M583 1038.4c0 4.1.2 4.6 2.3 4.6 4.1 0 12.6 3 15.4 5.4l2.8 2.4v51.9c0 28.5-.3 52.9-.7 54.3-1 3.6-5.7 6-13.3 6.7l-6.5.6v8.7h75v-8.5l-6.1-1.2c-7-1.3-10.6-3.4-11.9-6.9-.6-1.4-1-12.2-1-24V1111h2.4c1.7 0 3.8 1.6 6.9 5.2 7.9 9.4 20.4 26.4 30.7 41.7l10 15.1h54v-4.5c0-4.2-.2-4.5-2.7-4.5-9.6 0-14.9-4.4-33.2-27.5-25.8-32.6-25.3-31.9-22.8-32.9 21.7-8.7 29.2-16.8 30.4-32.9 1.4-17.8-5.7-27.5-24.7-33.9-6.3-2.2-8-2.2-56.7-2.6l-50.3-.3v4.5zm75 6.6c6.6 1.8 12.5 6.4 15.1 11.6 1.9 4.1 2.3 6.4 2.3 13.9 0 13.3-4.4 21.9-13.7 26.6-3.3 1.7-14.2 3.8-20.4 3.9H639v-57h7.8c4.2 0 9.3.5 11.2 1z" fill="#e41d19"/><path d="M386 1074.9c-23.2 7.5-36.1 25-36.3 49.1-.1 26.4 13.2 44.2 37.8 50.5 8.1 2.1 27.4 2 34.6-.1 3-.9 8.1-3 11.4-4.7 6.2-3.3 17-13.2 19.4-18 1.3-2.5 1.3-2.9-.5-4.2-5.5-4.1-5.5-4.1-13 3.3-8.3 8.1-13.2 10.2-23.8 10.2-11.2 0-20.1-5.1-24.7-14.2-2.7-5.4-4.9-14.4-4.9-20.5v-5.3h66v-2.3c0-7.2-2.2-19.5-4.3-24-4.6-10-15.3-18-27.5-20.6-8.4-1.7-27.7-1.3-34.2.8zm22.9 8.7c3.7 3 5.7 9.3 6.7 20.6l.6 7.8h-30.5l.6-7.3c.8-9.5 3.2-16.1 7.4-20.3 4.4-4.5 10.5-4.8 15.2-.8zM779 1074.9c-23.2 7.5-36.1 25-36.3 49.1-.1 26.4 13.1 44.2 37.8 50.5 8.2 2.1 27.2 2.1 34.5-.1 3-.9 8.2-3 11.5-4.7 6.2-3.3 17-13.2 19.4-18 1.3-2.5 1.3-2.9-.5-4.2-5.5-4.1-5.5-4.1-13 3.3-8.3 8.1-13.2 10.2-23.8 10.2-11.2 0-20.1-5.1-24.7-14.2-2.7-5.4-4.9-14.4-4.9-20.5v-5.3h66v-2.3c0-7.2-2.2-19.5-4.3-24-4.6-10-15.3-18-27.5-20.6-8.4-1.7-27.7-1.3-34.2.8zm22.9 8.7c3.7 3 5.7 9.3 6.7 20.6l.6 7.8h-30.5l.6-7.3c.8-9.5 3.2-16.1 7.4-20.3 4.4-4.5 10.5-4.8 15.2-.8zM964 1074.6c-18.1 4.8-31.1 16.5-36.2 32.7-2.4 7.5-2.8 22.7-.9 30.7 4.5 18.4 19.9 33 39.1 36.9 7.9 1.7 25.7 1.5 33.6-.4 25.1-5.8 39.8-24.5 39.8-50.5 0-20.5-8.6-35.6-25.5-44.5-3.6-1.9-9.5-4.1-13-5-8.3-1.9-29.4-1.9-36.9.1zm26.7 8.4c7.8 4.7 11.1 15 12 37 .6 17.2-1.1 29.2-5.4 37.9-3.6 7.2-7.8 10.1-14.7 10.1-13 0-19.3-11.4-20.3-37-1.1-26.6 2.9-42.5 12.1-48.1 4.2-2.5 12.1-2.5 16.3.1z"/><path d="M1064.8 1076.3l-16.8 1v8.4l4.5.6c6.1.9 10.2 3.1 12.5 7 1.9 3 2 5.3 2 46.7 0 23.9-.5 46.8-1 50.7-.8 6.4-4.1 15.3-5.6 15.3-.2 0-1.4-2.1-2.5-4.8-5.9-13.9-10.7-17.7-21.3-17-6.3.4-7.1.7-10.2 4-8.1 8.8-4.3 22.3 7.3 26.2 5.8 2 21.8 2.1 28.8.2 12.4-3.3 24.6-12.8 30.3-23.4 1.7-3.1 4-9.1 5.1-13.2 2-7.1 2.1-10 2.1-55.2V1075l-9.2.2c-5.1.1-16.8.6-26 1.1zM58 1084.6c-18.1 4.8-31.1 16.5-36.2 32.7-2.4 7.5-2.8 22.7-.9 30.7 4.5 18.3 19.9 33 38.9 36.9 7.7 1.6 26.6 1.3 34.1-.4 14.3-3.4 27.9-13.2 33.4-24.1 8.6-17.1 8.2-39.9-1.1-54.4-6.5-10.2-18.6-18.5-31.3-21.5-8.3-1.9-29.4-1.9-36.9.1zm26.7 8.4c7.8 4.7 11.1 15 12 37 .6 17.2-1.1 29.2-5.4 37.9-3.6 7.2-7.8 10.1-14.7 10.1-13 0-19.3-11.4-20.3-37-1.1-26.6 2.9-42.5 12.1-48.1 4.2-2.5 12.1-2.5 16.3.1z"/></svg>
                 </a>
            </div>',
            esc_url( apply_filters( 'generate_logo_href' , home_url( '/' ) ) ),
            esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) )
        );
    } );

    Thanks

    #1652830
    Elvin
    Staff
    Customer Support

    Hi there,

    I see that you’re not using any specific conditions for that particular filter except for adding your logo.

    That said, It may be better to just allow SVG file uploads on your site and place your logo normally as you would a png image.

    Here’s how you can upload SVG files on WordPress: https://www.wpbeginner.com/wp-tutorials/how-to-add-svg-in-wordpress/

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