Skip to content
Public Ticket #7077

SVG logo in Schema

Conversation thread

Vy Tran replied

Customer Reply

Alright, thank you again.

PenciDesign replied

Staff Reply

Hi,

Unfortunately, currently there is no another way to do that..

Best Regards,

PenciDesign

Vy Tran replied

Customer Reply

Thank you.

But I was afraid to fix the file in theme's root directory, because I had to fix it again after each update. Is there any more usable way?

PenciDesign replied

Staff Reply

Hi,

To do that, you need to edit the file inside the theme. Please open soledad/inc/json-schema-validar.php file and on line 326:

public static function get_url_logo() {
    $logo = get_template_directory_uri() . '/images/logo.png';
    if( get_theme_mod( 'penci_logo' ) ) {
        $logo = get_theme_mod( 'penci_logo' );
    }
    return $logo;
}

Change it to:

public static function get_url_logo() {
    return 'your-logo-url-put-here';
}

Note: 

Let's upload an version logo image with .png or .jpg formats and get URL of that logo image and replace with 'your-logo-url-put-here' on the above code.

Best Regards,

PenciDesign

Vy Tran started the conversation

Conversation Start

Hi there,

My website using the SVG logo and this makes my website logo schema error.

I know the JSON Schema requires the .png or .jpg formats but not .svg, is there a way I can still use my SVG logo without making Schema error?

e8XyoZR.png

I tried adding json-schema-validar.php file to my chid theme, change lines 169 and 266 to my .png logo but it looks like everything doesn't work.

Want to join this conversation or access attachments? Sign in first.