Site icon is not showing in mobile search results

Hi there,

our site icon is not showing in mobile search results unfortunately. I read that according to google, our page should define the siteicon with a header tag such as . But on our homepage it does not do that apparently. I cannot see it in the page code when inspecting it. However I have define the siteicon under customize. It is a png file with the size of 520x520 pixels, as recommended. I want to avoid overwriting theme functions, if possible.

Further I saw in the header.php there is a section as follows:

<?php if ( ! function_exists( 'has_site_icon' ) || ! has_site_icon() ) : ?>
          <?php if ( get_theme_mod('site_favicon') ) : ?>
                        <link rel="shortcut icon" href="<?php echo esc_url(get_theme_mod('site_favicon')); ?>" />
          <?php endif; ?>
<?php endif; ?>

So apparently the theme foresees this shortcut icon tag but I guess the function ‘has_site_icon’ somehow delivers the value “false”. What could be the reason for that?

Our homepage is https://www.coralia-liveaboard.com/.

Thanks in advance for your help & kind regards

Hello there,

Thank you for contacting us.

The site’s shortcot icon will appear only if the icon image is active. To activate it, from your site’s dashboard, go to Appearance > Customize > Site title/tagline/logo; and upload site icon image.

Stay safe.
Have a nice day!

Regards,
Kharis
aThemes Support

Hi,

thanks for your reply. As previously mentioned: I have uploaded the site icon under ‚customize/site title/tagline/logo‘, actually already since a long time. The siteicon also shows up for example on browser bookmarks. But in mobile search results it doesn’t. Google has already crawled the page but if course it doesn’t recognize a siteicon if the above mentioned link tag is missing.

Could you please help me to figure out why the theme doesn’t add the link tag even though a siteicon is defined? The function has_site_icon must somehow deliver false as return value, I think.

Thanks again and kind regards

Hello there,

Perhaps the active caching won’t load the recent changes. Please try to flush it from a caching plugin you’re using.

Let me know how it goes.

Stay safe.
Have an excellent day :slight_smile:

Regards,
Kharis
aThemes Support

Hi Kharis,

thank you. I have deleted the wordpress cache via plugin and also the browser cache again, but still the link rel=“shortcut icon” tag does not show up in the sourcecode of the page.
Additional note: we have been having a siteicon defined for at least a year, so this is likely not a caching problem.

Which other options do we have?

Thanks again and kind regards

Hello there,

Perhaps there is caching on Google search result. You may wait and try again in some times.

Please check the source code of your site and see whether that icon code presents.

Stay safe.
Have an excellent day :slight_smile:

Regards,
Kharis
aThemes Support