Changing header image size

Joined
Jan 30, 2025
Messages
2
Reaction score
0
I am working with a Wordpress theme. Originally the Wordpress theme had a 800 x 400 pixel recommendation for the header image. I went into the themes functions file and made it 1000 x 1000. pixels to fit my image so I didn't. have to crop it. Now it doesn't make me crop it when I go to customize it but after uploading it still seems to stretch it to 800 x 400 size and the image looks funny. Is there something else that needs to be changed?
 
Joined
Jan 14, 2025
Messages
20
Reaction score
5
You can add this to your functions.php file:
I am working with a Wordpress theme. Originally the Wordpress theme had a 800 x 400 pixel recommendation for the header image. I went into the themes functions file and made it 1000 x 1000. pixels to fit my image so I didn't. have to crop it. Now it doesn't make me crop it when I go to customize it but after uploading it still seems to stretch it to 800 x 400 size and the image looks funny. Is there something else that needs to be changed?
Add this to your functions.php file:

Code:
add_image_size('custom-header', 1000, 1000, true);
You should also check if the theme has any hardcoded image sizes in the CSS or template files.
 
Joined
Jan 30, 2025
Messages
2
Reaction score
0
Thanks I'll give this a try. I have zero knowledge of css or coding of any kind really. I'm just kind of playing around and guessing how to do things.
 
Joined
Jan 14, 2025
Messages
20
Reaction score
5
You're welcome.
You gotta start somewhere.
Feel free to visit my website. There's some valuable learning resources there, including CSS etc.
danoriordan.com.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,219
Messages
2,571,125
Members
47,731
Latest member
PasqualePf

Latest Threads

Top