{"id":1237,"date":"2014-04-09T11:58:10","date_gmt":"2014-04-09T11:58:10","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=1237"},"modified":"2022-06-22T09:25:13","modified_gmt":"2022-06-22T08:25:13","slug":"favicon","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/wordpress\/themes-wordpress\/favicon","title":{"rendered":"Favicon"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">favicon size<\/h4>\n\n\n\n<p>One item to note is that in the article above, Google now says not to provide a 16\u00d716 pixel favicon. <\/p>\n\n\n\n<p>Once upon a time, a 16\u00d716 pixel favicon was the only size you were supposed to provide. However, now they should be much larger (e.g. 512&#215;512) as Google and others now routinely show favicons next to search results.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Adding favicon.ico to a html page<\/h4>\n\n\n\n<p>Browsers will often pick up favicon.ico from the root directory of the site without needing to be told.<\/p>\n\n\n\n<p>You can use this in the head section of a page to specify it if you want:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;link rel=\"shortcut icon\" type=\"image\/x-icon\" href=\"\/favicon.ico\"\/&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Adding a favicon.ico to a theme<\/h4>\n\n\n\n<p>To add a favicon add this to functions.php in the theme child folder. &nbsp;(If it doesn&#8217;t work ensure the theme isn&#8217;t already doing it in the main functions.php file) <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/----- Custom favicon -----\nfunction blog_favicon() {\n  echo '&lt;link rel=\"shortcut icon\" type=\"image\/x-icon\" href=\"'.get_template_directory_uri().'\/favicon.ico\" \/&gt;'.\"\\n\";\n}\nadd_action('wp_head', 'blog_favicon');<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>favicon size One item to note is that in the article above, Google now says not to provide a 16\u00d716 pixel favicon. Once upon a time, a 16\u00d716 pixel favicon was the only size you were supposed to provide. However, now they should be much larger (e.g. 512&#215;512) as Google and others now routinely show [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[238,115],"tags":[],"class_list":["post-1237","post","type-post","status-publish","format-standard","hentry","category-icons","category-themes-wordpress"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=1237"}],"version-history":[{"count":7,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1237\/revisions"}],"predecessor-version":[{"id":4296,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1237\/revisions\/4296"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=1237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=1237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=1237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}