Hello, I'm Aaron Harun, a New York based
Traveler, Developer and Web Consultant.
You're about to have an "AaHa!" moment.

WordPress Post Featured Image Shortcode

The Featured Image Shortcode plugin is a 5-line plugin that adds a simple shortcode to insert the post’s thumbnail. (This is also referred to as the Featured Image by WordPress). Adds a [ post_thumbnail ] shortcode for use with wordpress post thumbnails. Also accepts [ post_thumbnail size="" ]. It only works for WP versions 2.9 and higher.

A Post Thumbnail is an image that is chosen as the representative image for a Post or Page. The display of this images is up to the theme. This is especially useful for “magazine-style” themes where each post has an image.


Use of this plugin is simple. If your theme supports Featured Images/ Post Thumbnails, you will see a box like the one in the screenshot that allows you to set a “featured image.” Once this image is set the Admin panel, add [ post_thumbnail ] into the post’s content and it will auto-magically insert the image you set. Just remember to remove the spaces.

I use this plugin to add the post thumbnails into the content of articles. See, on my blog page the images are being added in the theme, but on an individual article like this one for Moving WordPress the same image appears under the first paragraph.

You can also call the function directly in your theme with <?php post_thumbnail('size=thumbnail');?>. However, you are better off using the main WordPress function <?php echo get_the_post_thumbnail(null,'thumbnail');?>.

This Plugin requires that you be using WordPress 2.9 and have the feature enabled in your theme’s functions.php file. If you don’t have it enabled, see below on how to add post thumbnails.


Download Latest WordPress Post Thumbnails Shortcode Keys


Use the one-click installer! WordPress One-Click plugin install.


  1. Download the zip file, unzip it and upload to your wp-content/plugins folder
  2. Upload to your plugin directory.
  3. Activate.

The plugin is hosted in the WordPress Extend database so you can also manually install from your wordpress admin panel

  1. Go to “Add New” under Plugins
  2. Search for “Featured Image Shortcode”
  3. Click install now, confirm and follow any other instructions you are given.

How do I enable post thumbnails on my theme?

The code you have to add is:

if (function_exists('add_theme_support')) {
	set_post_thumbnail_size(50, 50, true); //Sets the default image to 50x50px and crops it
	add_image_size('post-hero', 590, 150, true); //Adds the large style images

To add the second custom sized image to the post, I use [ post_thumbnail size="post-hero" ]. It’s as easy as that. You can read more about enabling this feature in your themes here.

Posted in
50 comments on “WordPress Post Featured Image Shortcode
  1. I am trying to be versatile and never always sing the same songs.

  2. I absߋlutely love yo&#6489r blog ɑnd find tҺе majority &#1086f уоur post’ѕ t&#11423 Ье ѡҺɑt precisely І’m looking fοr. Would ү&#1086u offer guest writers tο &#7457rite сontent available fߋr үоu? Ι &#7457ouldn’t mind creating а post оr elaborating οn a few ߋf thе subjects y&#1086u &#7457rite гelated tο here. &#5034 gain, awesome site!

    Feel free to visit mʏ web-site; Fireworks Sydney

  3. Ideaal voor bedrijven op zoek naar het nieuwste, beste en het snelste op de markt.

  4. seo leads says:

    Place in the simplest way possible, organic Search Engine Optimization is search engine marketing completed by hand using no scripting that is automated, no underhand approaches and no black hat methods. It really is the purest form of optimizing your web site for the benefit of search engines, while nevertheless retaining interest for the website visitors, and done well it’s precisely the factor that search engines are looking for in a web site. As soon as it is found by them they will reward your website with improved positions within the search engine outcomes pages and better rankings. Through the class of the article it’ll be referenced to as simply buy seo leads.

  5. It is very important you know when looking for the home office chairs furniture nz you want, the way to search for the best discounts and bargains. This article is going to assist you.

    Remember what-you’re planning to study, and make sure attention is paid by you so you could know what to do.

  6. Ultra-sound scans are used extensively throughout maternity. They can assess whether or not it has any irregularities or Down’s syndrome and also the place of the placenta, when the infant arrives. Pregnancies can be detected by tests. That is when the embryo connects outside the womb to cervix, ovary or an oviduct. Where the child is upside-down, births can be also detected by them. In this instance c-section would be needed by the mother. Expectant moms may choose an exclusive ultra sound check to get a second view. Or they may want a personal radiology auckland xray services that carries a bundle of photos, DVDs CD-ROM or USB drive.

  7. GameZ8ne.com says:

    I have always maintained that one of the true allure’s associated with open wkrld games such aas this may bee the ability to be the biggest jackass and have no genuibe repercussions, and the tainer froom Gamee Z8ne provides you the best possibility at doing that in GTA V. Noot only do you obtain unlimited wellness and breath (you understand, in case you’re active chasing tht shark), but also unlimmited vehicle health, simply keep that in mind when using jet planes and tanks. Youu may also add money so you can just uncover a ton of articles like new weapons, cars and save houses because you see fit.

    In addition, the trainer gives you options like teleporting correct to way points plus no fall damage, which arre suree to assist with some of those tougher tasks. Remember that GameZ8ne is definitely your home for GTAV trainers!

  8. You will find reasons why carrots lay untouched at the dining room table and in the lunchbox. Some children say they are dull dull, and humdrum.

    But that all is a question of view. Do everything you can to liven up carrots in child- friendly manners and offer your kids the kids regularly. Both of these keys to success are in boosting the diet of your family your best bets. Kid-helpful cooking carrots are cook carrots that is easy. Here are three ways carrots could be served to your brood that ensure empty dishes and midriffs filled with carrots that are healthy:

  9. 2vn.co says:

    I’ve been browsing on-line greater than 3 hours as of late, yet I by no means found any interesting article like yours. It’s lovely value enough for me. In my opinion, if all site owners and bloggers made good content as you did, the net will probably be much more useful than ever before.

  10. Melody says:

    Repo Earth is actually a repossession service that performs foreclosure companies everywhere in Massachusetts. We are when additional repossessors haven’t had the opportunity to a conditional repo company that may uncover your car in Ma. US Repo can be a repossession service that is based in Ma. We have specialist skip tracers that can uncover your equity anywhere in Boston. Repo companies throughout Massachusetts.

  11. online chat says:

    Pojdte se vyráԀіt na naše erotické hrište plné sexu.

    jste na správné adrese, v naší komunite ѕi jiste vyberete. Seznamování pomocí Sezsnamky ϳe snadné, všechno je ttu možné.

  12. But, in climates where the temperature has a tendency to drop below the freezing point, obtaining the suitable boots will determine whether your feet have adequate protection during tough weather conditions.

    However, when you have to buy these boots, make sure that you purchase a good brand of boots so that you can utilise the benefits offered by it. Absolutely no need to forgo style for comfort with designers adding flair to shearling boots this season like never before.

  13. Jewel says:

    I like what you guys are usually up too. This sort of clever work and reporting!

    Keep up the great works guys I’ve included you guys to blogroll.

  14. aakg says:

    Wonderful article! We will be linking to this particularly great content on our website. Keep up the great writing.

  15. Hi there it’s me, I am also visiting this site regularly, this site is genuinely good and the visitors are really sharing nice thoughts.

  16. instradati says:

    If you are serious about finding a good woman for a long-term relationship or even for a casual date, you should spend the time required to make it happen. Every time you communicate with a person, the recipient knows that you had a lot of methods at your disposal. Find A Quality Man – Who says you can’t find love after the age of 50.

  17. I do not know whether it’s just me or if everyone else encountering issues with your site. It appears like some of the text in your posts are running off the screen. Can someone else please provide feedback and let me know if this is happening to them as well? This might be a issue with my browser because I’ve had this happen previously.

    Many thanks

  18. Hey there, You’ve done a great job. I will definitely digg it and personally suggest to my friends. I’m sure they will be benefited from this site.

  19. It is a tradition that has followed Christmas for years and years.

    There are several ways to restore a beautiful smile, if you have a cracked tooth or if the series of them were cracked, dental fillings can be applied to each teeth in order to reshape them and make them look natural, Veneers also add a beautiful touch to the entire reconstructive procedure because they can’t even things out and they can make you look like you’ve never had a problem before, not to mention that they can make your smile look a lot brighter than it did before. And distortions in the template are what manifest into brain imbalances in the biological system.

  20. Very nice post. I just stumbled upon your blog and wanted to say that I have truly enjoyed surfing around your blog posts.

    In any case I will be subscribing to your feed and I hope you write again soon!

  21. grow light says:

    Hello There. I discovered your blog the usage of msn. This is a really smartly written article. I’ll be sure to bookmark it and return to read more of your useful info. Thanks for the post. I’ll certainly comeback.

  22. You also stand a chance of getting cars still covered by factory warranty. There was very little in the news, however, about the horrors of his concentration camps what would eventually take the lives of six million Jews and four million others. Also you may end up having to pay for higher rate of interest on loans for used cars.

    Visit my site; cheap cars in

  23. Hi there i am kavin, its my first time to commenting anyplace, when i read this piece of writing i thought i could also create comment due to this sensible piece of writing.

  24. Can I just say what a comfort to find somebody who genuinely understands what they’re discussing on the net. You definitely realize how to bring an issue to light and make it important. A lot more people ought to look at this and understand this side of your story.

    I was surprised you aren’t more popular because you most certainly possess the gift.

  25. After looking over a handful of the blog posts on your web page, I truly like your technique of blogging. I saved as a favorite it to my bookmark site list and will be checking back in the near future. Please check out my website as well and let me know how you feel.

  26. Hey! I’m at work surfing around your blog from my new iphone 4! Just wanted to say I love reading through your blog and look forward to all your posts! Carry on the great work!

  27. Thank you for sharing your thoughts. I truly appreciate your efforts and I will be waiting for your next write ups thank you once again.

    Visit my weblog minecraft host (minecraftserverhostinginc.webs.com)

  28. Shanna says:

    With havin so much content and articles do you ever run into any issues of plagorism or copyright violation? My blog has a lot of completely unique content I’ve either created myself or outsourced but it looks like a lot of it is popping it up all over the web without my permission. Do you know any techniques to help protect against content from being ripped off? I’d definitely appreciate it.

    My homepage … dayz free download (Shanna)

  29. You really make it appear so easy together with your presentation however I in finding this matter to be really one thing that I believe I would by no means understand.

    It sort of feels too complicated and very extensive for me. I am taking a look forward to your subsequent put up, I will try to get the hang of it!

    Stop by my blog post; minecraft host

  30. Fastidious answers in return of this issue with firm arguments and telling all regarding that.

    Feel free to visit my homepage – dayz standalone download – http://www.facebook.com/ -

  31. Heya i’m for the first time here. I came across this board and I find It truly useful & it helped me out a lot. I hope to give something back and help others like you aided me.

  32. Donna says:

    Thanks for this simple but useful plugin. Will test in my site about father’s day gifts!

  33. Jason Eccles says:

    I changed the post_thumbnail_shortcode function to add element support.

    Might be a little specific but it works great on my site

    function post_thumbnail_shortcode($atts, $content=”) { if(!function_exists(‘post_thumbnail_shortcode’)) return;

    if(!$atts[‘size’]) $atts[‘size’] = ‘thumbnail';

    $image_small = simplexml_load_string(get_the_post_thumbnail(null,’thumbnail’))->attributes()->src; $image_medium = simplexml_load_string(get_the_post_thumbnail(null,’medium’))->attributes()->src; $image_large = simplexml_load_string(get_the_post_thumbnail(null, array(500, 500)))->attributes()->src; $image_full = simplexml_load_string(get_the_post_thumbnail(null,’full’))->attributes()->src; $image_meta = simplexml_load_string(get_the_post_thumbnail(null,’full’))->attributes()->alt;

    if($atts[‘size’] == ‘full’) { return ”; } else { return ”.get_the_post_thumbnail(null,$atts[‘size’]).”; } }

  34. John Weland says:

    I find this plugin super helpful for inserting a featured image in to my post content, however I wonder if there is an ability to add an alignment to the shortcode. as it is I can align the shortcode itself but it doesn’t append any sort of class to the image that is output so I can apply any CSS floats based of alignment -right or alignment-left for example.

  35. Assassins Creed IV: Black Flag has a pretty interesting combat system. For a less expensive method to appreciate terrific video games, check out “classic” games. Rodrigo believed that he we would lead the Templars to a vault of great significance.

  36. 3D animators are among the most sought after of animation professionals in India. Should you compare the expense of Maya or even 3DMax (Over $1000), 3DMagix is a no-brainer at the cost of less than $50. This engine has integrated support for some of the most powerful tools out there today and is creating relationship with many 3rd party developers, like Mixamo for example, that is allowing for even more tool integration.

  37. It is regularly updated to keep at par with the latest software. With a controller you just feel so constricted and you never forget that you’re the one guiding the character on screen. DOWNLOAD THE CHEAT TOOL FOR ASSASSIN’S CREED PIRATES FROM HERE.

  38. dee says:

    hi, i wonder if it is easy to give every displayed post thumbnail a transparent overlay automatically? (like a play button)

    must be easy i think but it has been years since i did php.. suggestion welcome!

    greetings, david

  39. Paul says:

    Can you give an example of [post_thumbnail size=""] shortcode in use? No matter what size I specify, the image appears full size.

    • Talita says:

      You should use the values “thumbnail”, “medium”, “large” or “full” to get the sizes predefined by your theme, e.g. [post_thumbnail size="medium"].

  40. Jacob Chapman says:

    Shweet! So… would <?php post_thumbnail size="post-hero"?> also work [directly inside my theme]? If not, could you get that to work in the next update? Thank you!!

  41. Ehsan says:

    Hi How can I use the featured image in my theme? the link you supplied doesn’t seem working! :(

  42. ritchie says:

    Where in my function.php i have to past it? because when i paste it in the document i got a syntax error?

  43. meg says:

    where should i add this code?: if (function_exists(‘add_theme_support’)) { add_theme_support(‘post-thumbnails’); set_post_thumbnail_size(50, 50, true); //Sets the default image to 50x50px and crops it add_image_size(‘post-hero’, 590, 150, true); //Adds the large style images }

Leave a Reply

Standard Rules Apply: Use <code> tags for code snippets. Keep it relevant. Other than that, be your awesome self.


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>