{"id":4424,"date":"2011-02-24T01:31:34","date_gmt":"2011-02-24T09:31:34","guid":{"rendered":"http:\/\/www.oeconomist.com\/blogs\/daniel\/?page_id=4424"},"modified":"2020-05-21T01:57:40","modified_gmt":"2020-05-21T08:57:40","slug":"the-code-and-how-to-use-it","status":"publish","type":"page","link":"https:\/\/www.oeconomist.com\/blogs\/daniel\/?page_id=4424","title":{"rendered":"FavIcons, Apple Touch Icons, Site Thumbnail Images, and WordPress: Code and How to Use It"},"content":{"rendered":"<p>This page is part of <a href=\"?p=4489\">a discussion on supporting favicons, Apple Touch icons, and site thumbnail images<\/a>.  If you're not quite sure what <code>favicon<\/code>s or Apple Touch icons or site thumbnail images are, then you might want to back-up and read <a href=\"?page_id=4400\"><q>FavIcons, Apple Touch Icons, and Site Thumbnail Images<\/q><\/a>.  If you want to read about choices in how to code support for <code>favicon<\/code>s, Apple Touch icons, and site thumbnail images with <a href=\"https:\/\/www.php.net\/\"><abbr title=\"Personal Home Pages Hypertext Processor\">PHP<\/abbr><\/a> in general and <a href=\"https:\/\/www.wordpress.org\/\">WordPress<\/a> in particular, then read <a href=\"?page_id=4479\">the next part of the discussion<\/a>.<\/p> <p>I think that a great many people are just going to want code that they can drop into a theme, and a practical explanation of how to use that code.  Well, here it is.<\/p> <h4>The Code<\/h4> <p>In <code>functions.php<\/code>, if it's not already there, include the instruction<\/p> <blockquote style=\"width: 91%; overflow: auto ; white-space: nowrap ;\"><code>if (function_exists(&#39;add_theme_support&#39;))<br \/>&nbsp;&nbsp;add_theme_support(&#39;post-thumbnails&#39;);<\/code><\/blockquote> <p>Also into <code>functions.php<\/code>, insert<\/p> <blockquote style=\"width: 91%; overflow: auto ; white-space: nowrap ;\"><p><code>\/* Returns string containing MIME type of an image file.<br \/>&nbsp;* Requires PHP 4.3.0 or higher. *\/<br \/>function getimagemimetype ($filespec)<br \/>{<br \/>&nbsp;&nbsp;$imagesizearray = getimagesize($filespec);<br \/>&nbsp;&nbsp;$type = $imagesizearray&#91;&#39;mime&#39;&#93;;<br \/>&nbsp;&nbsp;if (strlen($type) == 0)<br \/>&nbsp;&nbsp;{ \/* See if it might be a .ICO *\/<br \/>&nbsp;&nbsp;&nbsp;&nbsp;$identifier = fread(fopen($filespec,&#39;r&#39;),4);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;$bytes = &#34;\\x0\\x1\\x2&#34;;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;if ( ($identifier&#91;0&#93; == $bytes&#91;0&#93;) && ($identifier&#91;1&#93; == $bytes&#91;0&#93;)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&&<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(($identifier&#91;2&#93; == $bytes&#91;1&#93;) || ($identifier&#91;2&#93; == $bytes&#91;2&#93;))<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&&<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;($identifier&#91;3&#93; == $bytes&#91;0&#93;))<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$type = &#34;image\/vnd.microsoft.icon&#34;;<br \/>&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;return ($type);<br \/>}<\/code><\/p><p><\/p><p><code>function tag_for_favicon ()<br \/>{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;$siteurl = get_bloginfo('siteurl');<br \/>&nbsp;&nbsp;&nbsp;&nbsp;$favicon_spec = \"\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;$favicon_type = \"\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;$favicon_size = \"\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;if (file_exists(\"favicon.png\"))<br \/>&nbsp;&nbsp;&nbsp;&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$favicon_spec = $siteurl . \"\/favicon.png\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$favicon_type = getimagemimetype(\"favicon.png\");<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$favicon_size = \"16\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;else if (file_exists(\"favicon.gif\"))<br \/>&nbsp;&nbsp;&nbsp;&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$favicon_spec = $siteurl . \"\/favicon.gif\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$favicon_type = getimagemimetype(\"favicon.gif\");<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$favicon_size = \"16\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;else if (file_exists(\"favicon.ico\"))<br \/>&nbsp;&nbsp;&nbsp;&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$favicon_spec = $siteurl . \"\/favicon.ico\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$favicon_type = getimagemimetype(\"favicon.ico\");<br \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;if ($favicon_spec)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo \" &lt;link rel=\\\"icon\\\" href=\\\"\" . $favicon_spec . \"\\\" type=\\\"\" . $favicon_type . \"\\\"\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($favicon_size)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo \" sizes=\\\"\" . $favicon_size . \"x\" . $favicon_size . \"\\\"\" ;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo \" \/&gt;\\n\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo \" &lt;link rel=\\\"shortcut icon\\\" href=\\\"\" . $favicon_spec . \"\\\" type=\\\"\" . $favicon_type . \"\\\" \/&gt;\\n\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;$favicon_possible_size = array(\"32\", \"96\", \"128\", \"167\", \"192\", \"195\", \"196\", \"228\", \"512\");<br \/>&nbsp;&nbsp;&nbsp;&nbsp;foreach ($favicon_possible_size as $favicon_size)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;{ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$favicon_sizes = $favicon_size . \"x\" . $favicon_size;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$favicon_name = \"favicon-\" . $favicon_sizes . \".png\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (file_exists($favicon_name))<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$favicon_spec = $siteurl . $favicon_name;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$favicon_type = getimagemimetype($favicon_name);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo \" &lt;link rel=\\\"icon\\\" href=\\\"\" . $favicon_spec . \"\\\" type=\\\"\" . $favicon_type . \"\\\" sizes=\\\"\" . $favicon_sizes<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;. \"\\\" \/&gt;\\n\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;if (file_exists(\"favicon-196.png\"))<br \/>&nbsp;&nbsp;&nbsp;&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$favicon_spec = $siteurl . \"favicon-196.png\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$favicon_type = getimagemimetype(\"favicon-196.png\");<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo \" &lt;link rel=\\\"shortcut icon\\\" href=\\\"\" . $favicon_spec . \"\\\" type=\\\"\" . $favicon_type . \"\\\" sizes=\\\"196x196\\\" \/&gt;\\n\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>}<br \/><br \/>function tag_for_apple_touch_icons ()<br \/>{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;$siteurl = get_bloginfo('siteurl');<br \/>&nbsp;&nbsp;&nbsp;&nbsp;$apple_touch_icon_possible_size = array(\"57\", \"72\", \"76\", \"120\", \"144\", \"152\", \"180\"); <br \/>&nbsp;&nbsp;&nbsp;&nbsp;foreach ($apple_touch_icon_possible_size as $apple_touch_icon_size)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$apple_touch_icon_sizes = $apple_touch_icon_size . \"x\" . $apple_touch_icon_size;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$apple_touch_icon_name_partial = \"apple-touch-icon-\" . $apple_touch_icon_sizes;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (file_exists($apple_touch_icon_name_partial . \"-precomposed.png\"))<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo \" &lt;link rel=\\\"apple-touch-icon-precomposed\\\" sizes=\\\"\" . $apple_touch_icon_sizes . \"\\\" href=\\\"\"<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;. $siteurl . $apple_touch_icon_name_partial . \"-precomposed.png\\\" \/&gt;\\n\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else if (file_exists($apple_touch_icon_name_partial . \".png\"))<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo \" &lt;link rel=\\\"apple-touch-icon\\\" sizes=\\\"\" . $apple_touch_icon_sizes . \"\\\" href=\\\"\" . $siteurl<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;. $apple_touch_icon_name_partial . \".png\\\" \/&gt;\\n\";<br \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>}<br \/><\/code><\/p><p><\/p><p><code>function tag_for_thumbnail ()<br \/>{<br \/>&nbsp;&nbsp;$thumbnail_graphic_spec = &#34;&#34;;<br \/>&nbsp;&nbsp;$thumbnail_graphic_type = &#34;&#34;;<br \/>&nbsp;&nbsp;if (is_singular())<br \/>&nbsp;&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;if (function_exists(&#39;has_post_thumbnail&#39;)) \/* Introduced in WordPress 2.9 *\/<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (has_post_thumbnail())<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$image_array = wp_get_attachment_image_src(get_post_thumbnail_id());<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$thumbnail_graphic_spec = esc_attr($image_array&#91;0&#93;);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$thumbnail_graphic_type = getimagemimetype($thumbnail_graphic_spec);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;if (!$thumbnail_graphic_spec)<br \/>&nbsp;&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;if (file_exists(&#34;thumbnail_graphic.png&#34;))<br \/>&nbsp;&nbsp;&nbsp;&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$thumbnail_graphic_spec = get_bloginfo(&#39;siteurl&#39;) . &#34;\/thumbnail_graphic.png&#34;;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$thumbnail_graphic_type = getimagemimetype(&#34;thumbnail_graphic.png&#34;);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;else if (file_exists(&#34;thumbnail_graphic.gif&#34;))<br \/>&nbsp;&nbsp;&nbsp;&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$thumbnail_graphic_spec = get_bloginfo(&#39;siteurl&#39;) . &#34;\/thumbnail_graphic.gif&#34;;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$thumbnail_graphic_type = getimagemimetype(&#34;thumbnail_graphic.gif&#34;);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;&nbsp;&nbsp;else if (file_exists(&#34;thumbnail_graphic.jpg&#34;))<br \/>&nbsp;&nbsp;&nbsp;&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$thumbnail_graphic_spec = get_bloginfo(&#39;siteurl&#39;) . &#34;\/thumbnail_graphic.jpg&#34;;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$thumbnail_graphic_type = getimagemimetype(&#34;thumbnail_graphic.jpg&#34;);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;}<br \/>&nbsp;&nbsp;if ($thumbnail_graphic_spec)<br \/>&nbsp;&nbsp;{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;echo &#34; &lt;link rel=\\&#34;image_src\\&#34; href=\\&#34;&#34; . $thumbnail_graphic_spec . &#34;\\&#34; type=\\&#34;&#34; . $thumbnail_graphic_type<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;. &#34;\\&#34; \/&gt;\\n&#34;;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;echo &#34; &lt;meta property=\\&#34;og:image\\&#34; content=\\&#34;&#34; . $thumbnail_graphic_spec . &#34;\\&#34; \/&gt;\\n&#34;;<br \/>&nbsp;&nbsp;}<br \/>}<\/code><\/p><p><\/p><p><code>global $wp_version;<br \/>if (version_compare($wp_version, '4.3', '<'))<br \/>{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;add_action('wp_head','tag_for_favicon',5);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;add_action('wp_head','tag_for_apple_touch_icons',5);<br \/>}<br \/>add_action('wp_head','tag_for_thumbnail',5);<\/code><\/p><\/blockquote> <h4>How to Use It<\/h4> <p>With this code, <code>favicon<\/code>s, Apple Touch icons, and <em>default<\/em> site thumbnail icons must each be placed in the home directory of the &#39;blog, or tags will not be generated for them.  Users should be explicitly told that file names are case-sensitive.<\/p> <p><code>favicon<\/code>s may be named <q><code>favicon.png<\/code><\/q>, <q><code>favicon.gif<\/code><\/q>, or <q><code>favicon.ico<\/code><\/q>.  If more than one of these were placed in that directory, then <code>favicon.png<\/code> would pre&euml;mpt <code>favicon.gif<\/code>, which would pre&euml;mpt <code>favicon.ico<\/code>.<\/p> <p>Otherwise, favicons must be named <q><code>favicon-<\/code><var>X<\/var><code>x<\/code><var>X<\/var><code>.png<\/code><\/q> (where <q><var>X<\/var><\/q> is a substring <q><code>32<\/code><\/q>, <q><code>96<\/code><\/q>, <q><code>128<\/code><\/q>, <q><code>167<\/code><\/q>, <q><code>192<\/code><\/q>, <q><code>196<\/code><\/q>, <q><code>228<\/code><\/q>, or <q><code>512<\/code><\/q>). A tag will be inserted for each of the conforming files.<\/p> <p>Apple Touch icons must be named <q><code>apple-touch-icon-<\/code><var>X<\/var><code>x<\/code><var>X<\/var><code>-precomposed.png<\/code><\/q> (where <q><var>X<\/var><\/q> is a substring <q><code>57<\/code><\/q>, <q><code>72<\/code><\/q>, <q><code>76<\/code><\/q>, <q><code>120<\/code><\/q>, <q><code>144<\/code><\/q>, <q><code>152<\/code><\/q>, or <q><code>180<\/code><\/q>) or <q><code>apple-touch-icon-<\/code><var>X<\/var><code>x<\/code><var>X<\/var><code>.png<\/code><\/q> (where <q><var>X<\/var><\/q> is a substring <q><code>57<\/code><\/q>, <q><code>72<\/code><\/q>, <q><code>76<\/code><\/q>, <q><code>120<\/code><\/q>, <q><code>144<\/code><\/q>, <q><code>152<\/code><\/q>, or <q><code>180<\/code><\/q>).  Icons with the substring <q><code>-precomposed<\/code><\/q> in their names will pre&euml;mpt those without that substring.  Otherwise, a tag will be inserted for each of the conforming files.<\/p> <p><em>Default<\/em> site thumbnail images must be named <q><code>thumbnail_graphic.png<\/code><\/q> or <q><code>thumbnail_graphic.gif<\/code><\/q> or <q><code>thumbnail_graphic.jpg<\/code><\/q>.  If more than one of these were placed in the directory, then <code>thumbnail_graphic.png<\/code> would pre&euml;mpt <code>thumbnail_graphic.gif<\/code>, which would pre&euml;mpt <code>thumbnail_graphic.jpg<\/code>.<\/p> <h4>WordPress <q>Featured<\/q> Images<\/h4> <p>What is called a <q><code>post_thumbnail<\/code><\/q> in the WordPress <a href=\"https:\/\/www.php.net\/\"><abbr title=\"Personal Home Pages Hypertext Process\">PHP<\/abbr><\/a> code is called a <q>featured image<\/q> in the posting interface.  In keeping with the conception implicit in these conventions, the above code allows the user, for any given post or page, to pre&euml;mpt the default thumbnail image with an image selected as a featured image.<\/p> <p>Support for featured images is enabled by that<\/p> <blockquote style=\"width: 91%; overflow: auto ; white-space: nowrap ;\"><code>if (function_exists(&#39;add_theme_support&#39;))<br \/>&nbsp;&nbsp;add_theme_support(&#39;post-thumbnails&#39;);<\/code><\/blockquote> <p>bit above.  With featured images enabled, a <q>Featured Image<\/q> widget appears in the middle or lower right-hand side of the posting page, with a <q>Set featured image<\/q> link.  <em>Simply uploading an image by way of this link does not complete the process of setting the featured image.<\/em>  One must <em>additionally<\/em> click the <q>Use as featured image<\/q> link that will appear towards the bottom of the image-editing window that appears after the image has been up-loaded.<\/p> <p><a href=\"?page_id=4479\"><span style=\"font-style: bolder ; font-variant: small-caps ;\">Next:<\/span> PHP and WordPress Coding Issues<\/a><\/p> <p style=\"text-align: right ;\"><a href=\"?p=4489#respond\">Comments<\/a><\/p>","protected":false},"excerpt":{"rendered":"This page is part of a discussion on supporting favicons, Apple Touch icons, and site thumbnail images. If you're not quite sure what favicons or Apple Touch icons or site thumbnail images are, then you might want to back-up and read FavIcons, Apple Touch Icons, and Site Thumbnail Images. If you want to read about [&hellip;]","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-4424","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.oeconomist.com\/blogs\/daniel\/index.php?rest_route=\/wp\/v2\/pages\/4424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oeconomist.com\/blogs\/daniel\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.oeconomist.com\/blogs\/daniel\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.oeconomist.com\/blogs\/daniel\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oeconomist.com\/blogs\/daniel\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4424"}],"version-history":[{"count":0,"href":"https:\/\/www.oeconomist.com\/blogs\/daniel\/index.php?rest_route=\/wp\/v2\/pages\/4424\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.oeconomist.com\/blogs\/daniel\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}