{"id":878,"date":"2015-10-08T19:17:23","date_gmt":"2015-10-08T19:17:23","guid":{"rendered":"https:\/\/www.codexworld.com\/?p=878"},"modified":"2015-10-09T08:52:22","modified_gmt":"2015-10-09T08:52:22","slug":"add-featured-image-thumbnail-to-wordpress-post","status":"publish","type":"post","link":"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/","title":{"rendered":"Add featured image or thumbnail to WordPress post"},"content":{"rendered":"<p>Featured image or post thumbnail is pretty useful for your WordPress site. Using this feature, you&#8217;ll be able to add the thumbnail to WordPress post. This article will explain about how to add featured image or post thumbnail in WordPress.<\/p>\n<div class=\"img_center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld.png\" alt=\"add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld\" width=\"680\" height=\"396\" class=\"alignnone size-full wp-image-883\" srcset=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld.png 680w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld-300x175.png 300w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld-350x204.png 350w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld-320x186.png 320w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld-380x221.png 380w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld-200x116.png 200w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld-346x201.png 346w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/div>\n<p>All modern WordPress themes have already been embedded post thumbnail support. If you are a WordPress theme developer or want to build a custom theme, this tutorial will help you a lot for adding featured image support to your theme.<\/p>\n<h2>Enable Featured Image and Set Thumbnail Size<\/h2>\n<p><code>add_theme_support()<\/code> function is used for enabling the featured image in WordPress. Using <code>set_post_thumbnail_size() <\/code>function, you can add the default featured image dimensions.<br \/>\nOpen the <code>wp-content\/themes\/themeName\/functions.php<\/code> file and add the following code.<\/p>\n<pre><span style=\"color: #FF8000\">\/*<br \/>&nbsp;*&nbsp;Enable&nbsp;support&nbsp;for&nbsp;Post&nbsp;Thumbnails&nbsp;on&nbsp;posts&nbsp;and&nbsp;pages.<br \/>&nbsp;*\/<br \/><\/span><span style=\"color: #0000BB\">add_theme_support<\/span><span style=\"color: #007700\">(&nbsp;<\/span><span style=\"color: #DD0000\">'post-thumbnails'&nbsp;<\/span><span style=\"color: #007700\">);<br \/><br \/><\/span><span style=\"color: #FF8000\">\/\/Set&nbsp;thumbnail&nbsp;dimensions<br \/><\/span><span style=\"color: #0000BB\">set_post_thumbnail_size<\/span><span style=\"color: #007700\">(&nbsp;<\/span><span style=\"color: #0000BB\">346<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">230<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">true&nbsp;<\/span><span style=\"color: #007700\">);<\/span><\/pre>\n<p><code>$width<\/code> <b>=><\/b> Optional. An integer value of post thumbnail width in pixels.<br \/>\n<code>$height<\/code> <b>=><\/b> Optional. An integer value of post thumbnail height in pixels.<br \/>\n<code>$crop<\/code> <b>=><\/b> Optional. Boolean value for cropping of post thumbnail. False &#8211; Soft proportional crop mode\u00a0; True &#8211; Hard crop mode.<\/p>\n<h2>Additional Image Sizes for Featured Image<\/h2>\n<p>By default WordPress has four image sizes, &#8220;thumbnail&#8221; (150px x 150px), &#8220;medium&#8221; (300px x 300px), &#8220;large&#8221; (640px x 640px) and &#8220;full&#8221; (original size). You can add custom thumbnail size using <code>add_image_size()<\/code> function.<\/p>\n<pre><span style=\"color: #FF8000\">\/\/custom&nbsp;thumbnail&nbsp;size<br \/><\/span><span style=\"color: #0000BB\">add_image_size<\/span><span style=\"color: #007700\">(&nbsp;<\/span><span style=\"color: #DD0000\">'featured'<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">200<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">125<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">true&nbsp;<\/span><span style=\"color: #007700\">);<\/span><\/pre>\n<h2>Upload Featured Image<\/h2>\n<p>Go to the <b>Posts&nbsp;&raquo;&nbsp;Add New<\/b> and you&#8217;ll see the Featured Image section under the <b>Tags<\/b> section at the right sidebar.<\/p>\n<div class=\"img_center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-featured-image-upload-field-by-codexworld.png\" alt=\"wordpress-featured-image-upload-field-by-codexworld\" width=\"302\" height=\"97\" class=\"alignnone size-full wp-image-880\" srcset=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-featured-image-upload-field-by-codexworld.png 302w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-featured-image-upload-field-by-codexworld-300x96.png 300w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-featured-image-upload-field-by-codexworld-200x64.png 200w\" sizes=\"auto, (max-width: 302px) 100vw, 302px\" \/><\/div>\n<p>Click on <b>Set featured image<\/b> => Upload image and click on <b>Set featured image<\/b>.<\/p>\n<div class=\"img_center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-uploaded-featured-image-by-codexworld.png\" alt=\"wordpress-uploaded-featured-image-by-codexworld\" width=\"349\" height=\"350\" class=\"alignnone size-full wp-image-881\" srcset=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-uploaded-featured-image-by-codexworld.png 349w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-uploaded-featured-image-by-codexworld-150x150.png 150w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-uploaded-featured-image-by-codexworld-300x300.png 300w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-uploaded-featured-image-by-codexworld-200x201.png 200w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-uploaded-featured-image-by-codexworld-229x230.png 229w\" sizes=\"auto, (max-width: 349px) 100vw, 349px\" \/><\/div>\n<h2>Display Post Thumbnail<\/h2>\n<p><code>the_post_thumbnail()<\/code> function display the featured image for the current post. If you want to display the featured image in posts listing page, <code>the_post_thumbnail()<\/code> function must be used in loop. <\/p>\n<pre><span style=\"color: #000000\"><span style=\"color: #0000BB\">&lt;?php<br \/><\/span><span style=\"color: #007700\">if&nbsp;(&nbsp;<\/span><span style=\"color: #0000BB\">has_post_thumbnail<\/span><span style=\"color: #007700\">()&nbsp;)&nbsp;{&nbsp;<br \/>&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Post&nbsp;thumbnail.<br \/>&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">the_post_thumbnail<\/span><span style=\"color: #007700\">();<br \/>}<br \/><\/span><span style=\"color: #0000BB\">?&gt;<\/span><\/span><\/pre>\n<p><b>Displaying the custom-size thumbnail &#8211; <\/b>In the first parameter of <code>the_post_thumbnail()<\/code> function, provide the custom size keyword defined by <code>add_image_size()<\/code>.<\/p>\n<pre><span style=\"color: #000000\"><span style=\"color: #0000BB\">&lt;?php<br \/><\/span><span style=\"color: #007700\">if&nbsp;(&nbsp;<\/span><span style=\"color: #0000BB\">has_post_thumbnail<\/span><span style=\"color: #007700\">()&nbsp;)&nbsp;{&nbsp;<br \/>&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Post&nbsp;thumbnail.<br \/>&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">the_post_thumbnail<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'featured'<\/span><span style=\"color: #007700\">);<br \/>}<br \/><\/span><span style=\"color: #0000BB\">?&gt;<\/span><\/span><\/pre>\n<p>You can add the array of attribute\/value pairs in the second parameter of <code>the_post_thumbnail()<\/code> function.<\/p>\n<pre><span style=\"color: #000000\"><span style=\"color: #0000BB\">&lt;?php<br \/><\/span><span style=\"color: #007700\">if&nbsp;(&nbsp;<\/span><span style=\"color: #0000BB\">has_post_thumbnail<\/span><span style=\"color: #007700\">()&nbsp;)&nbsp;{&nbsp;<br \/>&nbsp;&nbsp;&nbsp;echo&nbsp;<\/span><span style=\"color: #0000BB\">the_post_thumbnail<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'featured'<\/span><span style=\"color: #007700\">,array(<\/span><span style=\"color: #DD0000\">'class'&nbsp;<\/span><span style=\"color: #007700\">=&gt;&nbsp;<\/span><span style=\"color: #DD0000\">\"attachment-<\/span><span style=\"color: #0000BB\">$size<\/span><span style=\"color: #DD0000\">&nbsp;img-responsive\"<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #DD0000\">'alt'&nbsp;<\/span><span style=\"color: #007700\">=&gt;&nbsp;<\/span><span style=\"color: #0000BB\">trim<\/span><span style=\"color: #007700\">(&nbsp;<\/span><span style=\"color: #0000BB\">strip_tags<\/span><span style=\"color: #007700\">(&nbsp;<\/span><span style=\"color: #0000BB\">get_post_meta<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">get_post_thumbnail_id<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">get_the_ID<\/span><span style=\"color: #007700\">()),&nbsp;<\/span><span style=\"color: #DD0000\">'_wp_attachment_image_alt'<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">true<\/span><span style=\"color: #007700\">)&nbsp;)&nbsp;)));<br \/>}<br \/><\/span><span style=\"color: #0000BB\">?&gt;<\/span><\/span><\/pre>\n<p>Now you&#8217;ll see the featured images in posts listing or where <code>the_post_thumbnail()<\/code> is included.<\/p>\n<div class=\"img_center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-post-list-with-featured-image-by-codexworld.png\" alt=\"wordpress-post-list-with-featured-image-by-codexworld\" width=\"566\" height=\"245\" class=\"alignnone size-full wp-image-882\" srcset=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-post-list-with-featured-image-by-codexworld.png 566w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-post-list-with-featured-image-by-codexworld-300x130.png 300w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-post-list-with-featured-image-by-codexworld-200x87.png 200w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/wordpress-post-list-with-featured-image-by-codexworld-346x150.png 346w\" sizes=\"auto, (max-width: 566px) 100vw, 566px\" \/><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Featured image or post thumbnail is pretty useful for your WordPress site. Using this feature, you&#8217;ll be able to add the thumbnail to WordPress post. This article will explain about how to add featured image <\/p>\n","protected":false},"author":1,"featured_media":883,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[25],"class_list":["post-878","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-wordpress","cat-5-id","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Add featured image or thumbnail to WordPress post - CodexWorld<\/title>\n<meta name=\"description\" content=\"Add featured image to post in WordPress. Beginners guide to adding theme support featured image in WordPress. Easy way to add featured image to WordPress post.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add featured image or thumbnail to WordPress post - CodexWorld\" \/>\n<meta property=\"og:description\" content=\"Add featured image to post in WordPress. Beginners guide to adding theme support featured image in WordPress. Easy way to add featured image to WordPress post.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/\" \/>\n<meta property=\"og:site_name\" content=\"CodexWorld\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-08T19:17:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-10-09T08:52:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld.png\" \/>\n\t<meta property=\"og:image:width\" content=\"680\" \/>\n\t<meta property=\"og:image:height\" content=\"396\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CodexWorld\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codexworldblog\" \/>\n<meta name=\"twitter:site\" content=\"@codexworldweb\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CodexWorld\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/add-featured-image-thumbnail-to-wordpress-post\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/add-featured-image-thumbnail-to-wordpress-post\\\/\"},\"author\":{\"name\":\"CodexWorld\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\"},\"headline\":\"Add featured image or thumbnail to WordPress post\",\"datePublished\":\"2015-10-08T19:17:23+00:00\",\"dateModified\":\"2015-10-09T08:52:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/add-featured-image-thumbnail-to-wordpress-post\\\/\"},\"wordCount\":318,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/add-featured-image-thumbnail-to-wordpress-post\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld.png\",\"keywords\":[\"WordPress\"],\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/add-featured-image-thumbnail-to-wordpress-post\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/add-featured-image-thumbnail-to-wordpress-post\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/add-featured-image-thumbnail-to-wordpress-post\\\/\",\"name\":\"Add featured image or thumbnail to WordPress post - CodexWorld\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/add-featured-image-thumbnail-to-wordpress-post\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/add-featured-image-thumbnail-to-wordpress-post\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld.png\",\"datePublished\":\"2015-10-08T19:17:23+00:00\",\"dateModified\":\"2015-10-09T08:52:22+00:00\",\"description\":\"Add featured image to post in WordPress. Beginners guide to adding theme support featured image in WordPress. Easy way to add featured image to WordPress post.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/add-featured-image-thumbnail-to-wordpress-post\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/add-featured-image-thumbnail-to-wordpress-post\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/add-featured-image-thumbnail-to-wordpress-post\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld.png\",\"width\":680,\"height\":396,\"caption\":\"add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/add-featured-image-thumbnail-to-wordpress-post\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codexworld.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Add featured image or thumbnail to WordPress post\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"name\":\"CodexWorld\",\"description\":\"Web &amp; Mobile App Development Company\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codexworld.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\",\"name\":\"CodexWorld\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"width\":200,\"height\":19,\"caption\":\"CodexWorld\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldweb\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/codexworld\",\"https:\\\/\\\/www.youtube.com\\\/codexworld\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\",\"name\":\"CodexWorld\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"caption\":\"CodexWorld\"},\"description\":\"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.\",\"sameAs\":[\"http:\\\/\\\/www.codexworld.com\",\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldblog\"],\"url\":\"https:\\\/\\\/www.codexworld.com\\\/author\\\/nitya192265\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Add featured image or thumbnail to WordPress post - CodexWorld","description":"Add featured image to post in WordPress. Beginners guide to adding theme support featured image in WordPress. Easy way to add featured image to WordPress post.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/","og_locale":"en_US","og_type":"article","og_title":"Add featured image or thumbnail to WordPress post - CodexWorld","og_description":"Add featured image to post in WordPress. Beginners guide to adding theme support featured image in WordPress. Easy way to add featured image to WordPress post.","og_url":"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/","og_site_name":"CodexWorld","article_publisher":"https:\/\/www.facebook.com\/codexworld","article_author":"https:\/\/www.facebook.com\/codexworld","article_published_time":"2015-10-08T19:17:23+00:00","article_modified_time":"2015-10-09T08:52:22+00:00","og_image":[{"width":680,"height":396,"url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld.png","type":"image\/png"}],"author":"CodexWorld","twitter_card":"summary_large_image","twitter_creator":"@codexworldblog","twitter_site":"@codexworldweb","twitter_misc":{"Written by":"CodexWorld","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/#article","isPartOf":{"@id":"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/"},"author":{"name":"CodexWorld","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0"},"headline":"Add featured image or thumbnail to WordPress post","datePublished":"2015-10-08T19:17:23+00:00","dateModified":"2015-10-09T08:52:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/"},"wordCount":318,"commentCount":2,"publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"image":{"@id":"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld.png","keywords":["WordPress"],"articleSection":["WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/","url":"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/","name":"Add featured image or thumbnail to WordPress post - CodexWorld","isPartOf":{"@id":"https:\/\/www.codexworld.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/#primaryimage"},"image":{"@id":"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld.png","datePublished":"2015-10-08T19:17:23+00:00","dateModified":"2015-10-09T08:52:22+00:00","description":"Add featured image to post in WordPress. Beginners guide to adding theme support featured image in WordPress. Easy way to add featured image to WordPress post.","breadcrumb":{"@id":"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/#primaryimage","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld.png","width":680,"height":396,"caption":"add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codexworld.com\/add-featured-image-thumbnail-to-wordpress-post\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codexworld.com\/"},{"@type":"ListItem","position":2,"name":"Add featured image or thumbnail to WordPress post"}]},{"@type":"WebSite","@id":"https:\/\/www.codexworld.com\/#website","url":"https:\/\/www.codexworld.com\/","name":"CodexWorld","description":"Web &amp; Mobile App Development Company","publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codexworld.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codexworld.com\/#organization","name":"CodexWorld","url":"https:\/\/www.codexworld.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","width":200,"height":19,"caption":"CodexWorld"},"image":{"@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldweb","https:\/\/www.linkedin.com\/company\/codexworld","https:\/\/www.youtube.com\/codexworld"]},{"@type":"Person","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0","name":"CodexWorld","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","caption":"CodexWorld"},"description":"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.","sameAs":["http:\/\/www.codexworld.com","https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldblog"],"url":"https:\/\/www.codexworld.com\/author\/nitya192265\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2015\/10\/add-featured-image-or-thumbnail-to-wordpress-post-by-codexworld.png","jetpack_shortlink":"https:\/\/wp.me\/p6bxIh-ea","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/878","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/comments?post=878"}],"version-history":[{"count":4,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/878\/revisions"}],"predecessor-version":[{"id":896,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/878\/revisions\/896"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media\/883"}],"wp:attachment":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media?parent=878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/categories?post=878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/tags?post=878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}