Support » Plugin: AMP » How to use the custom logo insted favico

  • Resolved amigodecristo

    (@amigodecristo)


    Hello,
    I would like to know, how can I use the custom logo instead of the default fav.ico in the structured data json. I read a similar topic here in the forum, but I could not apply the filter to the theme functions.

    Before in the results on carrocel of news uesd to shows the logo of my website, and now this is showing the fav.ico insted.

    https://wordpress.org/support/topic/missing-logo-on-amp-structured-data-2/

    Could you help me in applying the correct filter according to my theme?
    I thank you for your attention.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    What is the code you are using that isn’t working as expected?

    amigodecristo

    (@amigodecristo)

    I’m not using any, the problem is this, so as not to result in the error regarding the logo, I have to use the structured data of the Yoast plugin, but the structured data of them is not accurate, and when I use only the standard of the amp, I have better results .

    I was trying as below

    add_filter( ‘amp_site_icon_url’, function() {
    return get_wp-content_directory_uri() . ‘/uploads/2019/02/logo.png’;
    } );

    Ai searching the forum of yours I found this code mentioned, which solves, but I could not put the correct path of the logo in this code.

    Tanks for replying

    Plugin Author Weston Ruter

    (@westonruter)

    @amigodecristo Your PHP code has a syntax error. It should look like this instead:

    add_filter( 'amp_site_icon_url', function() {
        return content_url( '/uploads/2019/02/logo.png' );
    } );
    amigodecristo

    (@amigodecristo)

    Brilliant, thank you, I’ll try right now.

    I hope it solves that, I love your plugin, and I am greatly admired for your work, even though I have never commented here, but I have been following your work for a long time, Github.

    Congratulations.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to use the custom logo insted favico’ is closed to new replies.