So Obsessed

ARIANE'S FAN WORKS
ARIANE'S FAN WORKS
Hello!

Welcome to So Obsessed! This is my home on the net, where I post some personal stuff, fanart, memes and news regarding my screencaps and fansites. I have lots of wallpapers and icons here, as well as FocusWriter themes and more! Have a look around and I hope you enjoy your visit and come back soon!


Mar 13, 2022
intothisshadow

WordPress – Custom Header Image Cropping Not Working, Fix

Haven’t been able to the image cropper of the Appearance – > Header -> Add New Image -> Crop for a long, long time. Lots and lots of other users are having a similar problem, apparently it’s a WordPress core problem and looks like there’s a fix in the works which will be released with WordPress 6 according to some support ticket threads.

In the meanwhile, I found that some themes suffer from it while others don’t. So I compared two themes, and got the image cropper working enough for my needs in two monicandesign.com themes with the following:

1. Go to the theme’s folder and open inc/custom-header.php
2. Find function mnd_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'mnd_custom_header_args', array(

3. Add 'width' => 1920, to the array. The end result looks like this:

function mnd_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'mnd_custom_header_args', array(
'width' => 1920,
'height' => 430,
'flex-width' => true,
'flex-height' => true,
'uploads' => true,
'header-text' => false,
'wp-head-callback' => 'mnd_header_style',
) ) );
}

That enables the theme I’m using to crop images that are 1920px wide.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.