Home Forums WoodMart support forum About meta thumbnails on Google mobile display

About meta thumbnails on Google mobile display

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

    Vucci
    Participant

    The meta-thumbnail displayed on Google mobile is displayed with an unintended image selected.
    This is the home page meta thumbnail.
    I wrote the code like this in the function php of the child theme to fix it, but I couldn’t fix it.

    function add_meta_to_head() {
    if ( is_home() || is_front_page() || is_page() ) {
    echo ‘<meta name=”thumbnail” content=”any_image_url_here” />’;
    }else{
    echo ‘<meta name=”thumbnail” content=”‘ .wp_get_attachment_url( get_post_thumbnail_id() ). ‘” />’;
    }
    }
    add_action( ‘wp_head’, ‘add_meta_to_head’ );

    After writing this, I examined the page source and found that the header contained the code properly. However, it will not be reflected forever.

    Where is the set image prioritized?
    Is it possible to set the meta thumbnail of Google’s mobile display somewhere?

    Anyway, please support me.

    Attachments:
    You must be logged in to view attached files.
    #241838

    Artem Temos
    Keymaster

    Hello,

    Sorry, but this question is not related to our theme and beyond our support scope. We can’t advise you with questions related to search engine optimizations.

    Kind Regards

Viewing 2 posts - 1 through 2 (of 2 total)