Posted in WordPress

Favicon

You know how to insert a favicon? I think you’re wrong …
Favicon 16×16 .ico ? 🙂

You must do something like this:

	<?php $template = get_template_directory_uri(); ?>
	<link rel="shortcut icon" type="image/x-icon" sizes="48x48" href="<?php echo esc_url( $template . '/img/favicon/favicon.ico' ); ?>" />
	<link rel="apple-touch-icon" sizes="57x57" href="<?php echo esc_url( $template . '/img/favicon/apple-touch-icon-57x57.png' ); ?>">
	<link rel="apple-touch-icon" sizes="114x114" href="<?php echo esc_url( $template . '/img/favicon/apple-touch-icon-114x114.png' ); ?>">
	<link rel="apple-touch-icon" sizes="72x72" href="<?php echo esc_url( $template . '/img/favicon/apple-touch-icon-72x72.png' ); ?>">
	<link rel="apple-touch-icon" sizes="144x144" href="<?php echo esc_url( $template . '/img/favicon/apple-touch-icon-144x144.png' ); ?>">
	<link rel="apple-touch-icon" sizes="60x60" href="<?php echo esc_url( $template . '/img/favicon/apple-touch-icon-60x60.png' ); ?>">
	<link rel="apple-touch-icon" sizes="120x120" href="<?php echo esc_url( $template . '/img/favicon/apple-touch-icon-120x120.png' ); ?>">
	<link rel="apple-touch-icon" sizes="76x76" href="<?php echo esc_url( $template . '/img/favicon/apple-touch-icon-76x76.png' ); ?>">
	<link rel="apple-touch-icon" sizes="152x152" href="<?php echo esc_url( $template . '/img/favicon/apple-touch-icon-152x152.png' ); ?>">
	<link rel="icon" type="image/png" sizes="96x96" href="<?php echo esc_url( $template . '/img/favicon/favicon-96x96.png' ); ?>">
	<link rel="icon" type="image/png" sizes="16x16" href="<?php echo esc_url( $template . '/img/favicon/favicon-16x16.png' ); ?>">
	<link rel="icon" type="image/png" sizes="32x32" href="<?php echo esc_url( $template . '/img/favicon/favicon-32x32.png' ); ?>">
	<meta name="msapplication-TileColor" content="#f25b52">
	<meta name="msapplication-TileImage" content="<?php echo esc_url( $template . '/img/favicon/mstile-144x144.png' ); ?>">

This online service can do it for you.

Link: http://realfavicongenerator.net/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s