My new advanced WordPress course:
My new beginner WordPress course:

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.

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

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):

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

Follow me on Twitter for updates and cat pics:

Nguồn: https://otrasnoviaxeiro.com/

Xem thêm bài viết: https://otrasnoviaxeiro.com/category/cong-nghe

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments

Steven Jetton December 22, 2019 at 11:32 pm

hmmm…loving @learnwebcode, but for this tutorial, wordpress isn't giving me different image sizes.

Do I need the 'after_theme_setup' if I am building a completely new theme?

Here's my code:

function custom_theme_setup() {

// Navigation Menus
register_nav_menus(array(
'primary' => __('Primary Menu'),
'footer' => __('Footer Menu'),
));

// Add featured image support
add_theme_support('post-thumbnails');
add_image_size('small-thumbnail', 180, 120, true);
add_image_size('banner-image', 920, 210, true);
}

add_action('after_setup_theme', 'custom_theme_setup');

Reply

Amit Gupta December 22, 2019 at 11:32 pm

unable to edit featured image(there is no option for featured image. Image Hides the contents on Page as part of theme. Using elementor. Guide plz

Reply

Aamzad Hossain December 22, 2019 at 11:32 pm

I have a question about the featured image. Many authority sites disable the featured image (All of the featured images are big in size), but why do they keep the featured image disable? Please, I hope your ans.

Reply

Terry McBride December 22, 2019 at 11:32 pm

Lesson Eight, and I've followed each one with consummate ease: this set of tutorials is without a doubt the best I've ever watched, seen and have been a part of.

YES! – Its old, but watching the birds come home to roost has been a most rewarding experience; the cats not happy, but when are cats ever really happy.
When being fed of course .. and my kids are happy cats.
You can also be happy by watching this guys work: he's one heck of a brilliant teacher.

Reply

Ashraf Ahmed December 22, 2019 at 11:32 pm

thank You Brother 🙂

Reply

Tom December 22, 2019 at 11:32 pm

great bro. thanks

Reply

Hamro Information December 22, 2019 at 11:32 pm

hello, i am facing some problem with image. I cant insert images into a post, image is uploaded to media library but cant inserted into post or as featured images. If i switched to text mode from visual mode and check link image path is there but inside final post no image is appear. How to fixed it? Please help really got a problem is there any plugin to fixed it?

Reply

Ahmad Ali December 22, 2019 at 11:32 pm

this is the best toturial

Reply

Samar Debnath December 22, 2019 at 11:32 pm

Unable to create directory wp-content/uploads/2019/03. Is its patent directory writable by the server?
How to get rid of these error..?
Why "store uploads in this folder" is not showing in media settings…?
WP version:4.8.2
Mac OS
Plz help

Reply

salah ebrahimipour December 22, 2019 at 11:32 pm

You are an amazing, wonderful and so so lovely teacher

Thanks for the tutorial

Reply

Alessio Paoletti December 22, 2019 at 11:32 pm

how to add a secondary featured image? thanks for the tutorials!

Reply

Dario Briongos Varela December 22, 2019 at 11:32 pm

Hi. I've been following the LearnWebCode
tutorial from the begining.
When I try to upload an image I get the "An error occurred in the upload. Please try again later." message. I've done some googling but I'm unable to fix it. I have wampserver and WP local installation. Please help!!

Reply

Nicole Triplett December 22, 2019 at 11:32 pm

Hello,
I was lost as soon as you said opening the code? Where do I go to do that? My featured image has my head and feet cut off. I want to make it fit banner size I think because the featured image space that is there is a long rectangle…

Reply

David Milord December 22, 2019 at 11:32 pm

how did he even get to that function page to code it???

Reply

Lets Learn Now December 22, 2019 at 11:32 pm

Wow. It is an excellent video in detail. Like it. Subscribed

Reply

Mysterious Design December 22, 2019 at 11:32 pm

I have this one big question that comes in my mind.

Should I use pictures that are already uploaded on internet, or I should upload my pictures which I will use in my posts ?
And which one of this two methods would work for faster loading website ?

Thanks.

Reply

Monir Hosen December 22, 2019 at 11:32 pm

the best helpful tutorial for beginner

Reply

anime cruze December 22, 2019 at 11:32 pm

When we share on whatsapp thumb not showing.??

Reply

henrique Leonardo December 22, 2019 at 11:32 pm

vc é o melhor, your are amazing, thank you

Reply

Oliver Wood December 22, 2019 at 11:32 pm

These are the best WP tutorial I have seen — very easy to understand, logical and clear progression of processes.

Reply

yasemin sen December 22, 2019 at 11:32 pm

where do i find this function php file…ugh

Reply

Fielden Baker December 22, 2019 at 11:32 pm

Hello

Reply

Zambo December 22, 2019 at 11:32 pm

There's plugin called Regenerate Thumbnails

Reply

Zambo December 22, 2019 at 11:32 pm

Thank You.

Reply

Yannick Thibodeau December 22, 2019 at 11:32 pm

I stumbled upon this nice little WP extension (WP BFI ("Better Featured Image")) that allows you to manage your featured images directly from any posts/pages list screen, making this repetitive task easier and quickier : https://wordpress.org/plugins/wp-bfi-better-featured-image/

Reply

bestswissarmyknives December 22, 2019 at 11:32 pm

How I could I make thumbnail post nofllow

Reply

Gabriel Renfrow December 22, 2019 at 11:32 pm

I'd like to add a second featured image. Is that possible?

Reply

Hugo Guay December 22, 2019 at 11:32 pm

insert <?php if(has_post_thumbnail()) { echo "has-thumbnail"; }?> working good too. 😉

Reply

krishan chaudhary December 22, 2019 at 11:32 pm

Nice sir, your overall videos are helpfull for us

Reply

ALVVDH December 22, 2019 at 11:32 pm

Is the featured image the same as "snippet image"? Could you explain what a snippet image is and how they could be added to our posts?? Please!

Reply

Elia Krisetya December 22, 2019 at 11:32 pm

For some reason my featured image is overlapping my text, anybody know why?

Reply

Matt Wong December 22, 2019 at 11:32 pm

One problem is that you are using the same image for wide crop (banner) and thumbnail, when it would be more optimal to have two differently cropped images made specifically for the thumbnail and banner.

Reply

pranav ps December 22, 2019 at 11:32 pm

Dude, awesome tutorial! Very helpful.

Reply

omprakash Animator December 22, 2019 at 11:32 pm

hi, can u pls help , how to replace featured image by another image

Reply

Roshan Maharjan December 22, 2019 at 11:32 pm

My image doesnot show up when i click on Edit Image. Any help?

Reply

Alpha Designs & Marketing December 22, 2019 at 11:32 pm

really directional tutorials…keep it up

Reply

FengShuiEnthusiast LLC December 22, 2019 at 11:32 pm

"moving along" 🙂

Reply

Hariom Dubey December 22, 2019 at 11:32 pm

Thank you very much sir……. Great job.

Reply

Jonathan Laflamme December 22, 2019 at 11:32 pm

If someone can't figure out why the banner doesn't take all the width, ensure yourself it's more than 920px width originally.

Reply

Mark John Idio December 22, 2019 at 11:32 pm

my problem is that, the image is not responsive. 🙁

Reply

Harun -or-Rashid December 22, 2019 at 11:32 pm

I used Rosemary Theme for WordPress. Now I want to remove the White Stick (for read more …) on the Feature Image or I want to use "Transparent Color instead of White Color for read more…" . Now please can you help me to find out this setting option. Also feature image is bigger then computer skin, it should be smaller, but there is no setting option in Appearance > Customize Setting. Please help me. ( [email protected], my site : www.crafthousebd.com )

Reply

Jan Khan December 22, 2019 at 11:32 pm

excellent

Reply

Shipon Karmakar December 22, 2019 at 11:32 pm

Really amazing Tutorial go ahead man Thanks you are great

Reply

Xavier issac December 22, 2019 at 11:32 pm

Sir, How can i add more than one featured images in my WordPress website, without using any additional plugins.?

Reply

slawero December 22, 2019 at 11:32 pm

2:02 and intelligent design. I didn't expect to find God here.

Reply

Lesley Dewar December 22, 2019 at 11:32 pm

Brilliant. Thank you. I learned lots and you made it very easy to follow.

Reply

Ad Rienks December 22, 2019 at 11:32 pm

'featured image support':
N.B. use the right term; it is 'post-thumbnails', NOT 'post_thumbnails'(no underscore). My mistake; costed me frustration and about half an hour to find this out.

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *