Title: has_site_icon
Published: August 18, 2015
Last modified: May 20, 2026

---

# has_site_icon( int $blog_id ): bool

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/has_site_icon/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/has_site_icon/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/has_site_icon/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/has_site_icon/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/has_site_icon/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/has_site_icon/?output_format=md#wp--skip-link--target)

Determines whether the site has a Site Icon.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/has_site_icon/?output_format=md#parameters)󠁿

 `$blog_id`intoptional

ID of the blog in question. Default current blog.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/has_site_icon/?output_format=md#return)󠁿

 bool Whether the site has a site icon or not.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/has_site_icon/?output_format=md#source)󠁿

    ```php
    function has_site_icon( $blog_id = 0 ) {
    	return (bool) get_site_icon_url( 512, '', $blog_id );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/general-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/general-template.php#L1021)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/general-template.php#L1021-L1023)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/has_site_icon/?output_format=md#related)󠁿

| Uses | Description | 
| [get_site_icon_url()](https://developer.wordpress.org/reference/functions/get_site_icon_url/)`wp-includes/general-template.php` |

Returns the Site Icon URL.

  |

| Used by | Description | 
| [wp_site_icon()](https://developer.wordpress.org/reference/functions/wp_site_icon/)`wp-includes/general-template.php` |

Displays site icon meta tags.

  | 
| [wp_admin_bar_my_sites_menu()](https://developer.wordpress.org/reference/functions/wp_admin_bar_my_sites_menu/)`wp-includes/admin-bar.php` |

Adds the “My Sites/[Site Name]” menu and all submenus.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/has_site_icon/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.3.0](https://developer.wordpress.org/reference/since/4.3.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fhas_site_icon%2F)
before being able to contribute a note or feedback.