Changing header image size

Joined
Jan 30, 2025
Messages
1
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
18
Reaction score
4
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.
 

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

Members online

No members online now.

Forum statistics

Threads
474,197
Messages
2,571,038
Members
47,633
Latest member
BriannaLyk

Latest Threads

Top