{"id":98,"date":"2013-01-22T01:48:15","date_gmt":"2013-01-22T01:48:15","guid":{"rendered":"https:\/\/theextremewebdesigns.com\/blog\/?p=98"},"modified":"2013-01-22T01:48:15","modified_gmt":"2013-01-22T01:48:15","slug":"wordpress-display-thumbnail-for-post-2-ways","status":"publish","type":"post","link":"https:\/\/theextremewebdesigns.com\/blog\/wordpress-display-thumbnail-for-post-2-ways\/","title":{"rendered":"WordPress Display Thumbnail for Post (2 Ways)"},"content":{"rendered":"<p>Did you ever want to make <em><strong>WordPress display Thumbnail for post\u00a0<\/strong><\/em>but did not know how to do it? I am going to discuss 2 ways to do this. Just copy this snippet into your theme, wherever you want to <strong>display the\u00a0thumbnail<\/strong>\u00a0and that should do it.<!--more--><\/p>\n<p><strong>Method 1:<\/strong><\/p>\n<pre class=\"lang:php decode:true\">if (has_post_thumbnail())\n{\n$thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'thumbnail_name');\n\/\/ This gives the thumbnail url\necho $thumb[0];\n}<\/pre>\n<p><strong>Method 2:<\/strong><\/p>\n<pre class=\"lang:php decode:true\">&lt;?php\nif(has_post_thumbnail())\n{\nthe_post_thumbnail();\n}\n?&gt;<\/pre>\n<p>Do you know of any better method or a new method to <strong>display thumbnail for a post in WordPress<\/strong>? If yes, please share it with us in your comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Did you ever want to make WordPress display Thumbnail for post\u00a0but did not know how to do it? I am going to discuss 2 ways to do this. Just copy this snippet into your theme, wherever you want to display the\u00a0thumbnail\u00a0and that should do it.<\/p>\n","protected":false},"author":1,"featured_media":114,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,13,11,8],"tags":[31,30],"class_list":["post-98","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippets","category-tips-and-tricks","category-wordpress-tips-and-tricks","category-wordpress","tag-wordpress-snippets","tag-wordpress-tips"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paBnQX-1A","jetpack_sharing_enabled":true,"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts\/98","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/comments?post=98"}],"version-history":[{"count":0,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts\/98\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/media?parent=98"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/categories?post=98"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/tags?post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}