Published on May 27, 2014 by LearnWebCode

In this lesson we learn how to register new “image sizes” which specify the size and aspect ratio of the image that WordPress should automatically generate. Save 40% off my premium 8 hour web design video course through April 26th: learnwebcode.com/web-design-for-beginners-real-world-coding-html-css/

To view a complete list of the WordPress lessons in sequential order visit:

Learn WordPress

Link to download .zip of theme files as shown in this video (note: this is not a “complete” WordPress theme yet and this download is only intended for educational purposes to dissect and review):

WordPress Featured Image – Custom Size

Want to share the WordPress website that you’ve been creating on your computer with the world? Learn about the web host I use and how you can get a domain + hosting for $4.95 a month ($60 savings): learnwebcode.com/web-hosting/

Sign up for my newsletter to receive periodic webDev tips, tricks, resources and coupons. Join the list at learnwebcode.com/

Follow LearnWebCode on Twitter for resources and updates:
twitter.com/learnwebcode

Leave a Reply

216 Comments on "WordPress Featured Image Tutorial"

Notify of
avatar

Alexik09
Guest
Alexik09
3 years 2 months ago

Hello. how do you add an image in the header of the site? And where soud that image be located in my folders for it to be able to appear on the site?

Caduzeus
Guest
Caduzeus
2 years 5 months ago
+Herman Jager I assume that you have already got an answer, since you posted your message some 4 weeks ago, but here are the instructions if someone else has faced the same issue:1. Upload an image you want to WordPress, click it and use the URL provided in the right-hand side below the image properties.2. Then just add it to the header.php file with an <img> tag. If you want to add a logo, put it before the main h1-title and give it a class of "logo". You can also make it a link to your homepage with the same… Read more »
Herman Jager
Guest
Herman Jager
2 years 6 months ago

+Alexik09 Hi there, I have got the exact same question. Since there have been past seven month: do you have an answer already?

Samantha Fowler
Guest
Samantha Fowler
3 years 2 months ago

7:08 ..irregardless….my favorite word. Great tutorials though! :):)

Mike Krier
Guest
Mike Krier
2 years 1 month ago

+LearnWebCode I caught that too. Your entire tutorial series is ruined now. LOL. BTW you could also swap in for "irrespective" instead.

Jaguar Paw
Guest
Jaguar Paw
2 years 3 months ago

Irregardless of what you say. I will not step away.

Alex Alonso
Guest
Alex Alonso
2 years 3 months ago

+John Wick step away from Samantha, you monster! Great tutorial =D

Darryl de Jesus
Guest
Darryl de Jesus
2 years 6 months ago

+Samantha Fowler That kinda distract me a little too… but yeah still a great tutorial. 😀

Jaguar Paw
Guest
Jaguar Paw
3 years 1 month ago

Samantha you're beautiful.

flyguy017
Guest
flyguy017
3 years 3 months ago

Great video, thanks. How do you wrap the featured image with an external url that when clicked on would take the viewer to another url?

Its-me92
Guest
Its-me92
3 years 3 months ago

When did you create 'single.php'? And what is the content of it? Is it the same as in index.php?

Its-me92
Guest
Its-me92
3 years 3 months ago

Thank you so much! 🙂

LearnWebCode
Guest
LearnWebCode
3 years 3 months ago

+Its-me92 That's a great question. I may have accidentally created "single.php" off camera in-between lessons.  When in doubt, you can usually duplicate our "index.php" file from this series, rename it appropriately and make subtle adjustments.  In this case, for "single.php" I'm including the code for alternate sized images and I'd also suggest making "the_title" of the post not be wrapped in a link.

Joanna Misunas
Guest
Joanna Misunas
3 years 5 months ago

what if your theme doesn't have an 'index.php' file?  any alternative?

John Wick
Guest
John Wick
3 years 14 days ago

that page is a must in wordpress.

Work with Free tools
Guest
Work with Free tools
3 years 5 months ago

Nice one bro, keep it up

sayed akbarali
Guest
sayed akbarali
3 years 8 months ago

This Tutorial help me learn feature images in WP Thanks a million for this

1 15 16 17
wpDiscuz