0
我創建了一個基於經典twentyten主題的wordpress主題。 我改變了functions.php中頭部圖像的大小,但除此之外我沒有弄亂自定義頭部的東西。現在,當我將精選圖像分配給頁面時,wordpress忽略它,而只顯示在頁眉設置中選擇的背景。 圖像的大小似乎似乎沒有任何關係的問題。我試圖使用確切的圖像尺寸和更大的圖像,他們總是被忽略...wordpress忽略精選圖像
謝謝,如果你可以幫助!
PS。這裏的網站的鏈接:http://stuck-mueller.de/beta/
這裏距離的functions.php代碼:
// The custom header business starts here.
$custom_header_support = array(
// The default image to use.
// The %s is a placeholder for the theme template directory URI.
'default-image' => '%s/images/headers/path.jpg',
// The height and width of our custom header.
'width' => apply_filters('twentyten_header_image_width', 960),
'height' => apply_filters('twentyten_header_image_height', 240),
// Support flexible heights.
'flex-height' => true,
// Don't support text inside the header image.
'header-text' => false,
// Callback for styling the header preview in the admin.
'admin-head-callback' => 'twentyten_admin_header_style',
);
add_theme_support('custom-header', $custom_header_support);
if (! function_exists('get_custom_header')) {
// This is all for compatibility with versions of WordPress prior to 3.4.
define('HEADER_TEXTCOLOR', '');
define('NO_HEADER_TEXT', true);
define('HEADER_IMAGE', $custom_header_support['default-image']);
define('HEADER_IMAGE_WIDTH', $custom_header_support['width']);
define('HEADER_IMAGE_HEIGHT', $custom_header_support['height']);
add_custom_image_header('', $custom_header_support['admin-head-callback'] );
add_custom_background();
}
// We'll be using post thumbnails for custom header images on posts and pages.
// We want them to be 940 pixels wide by 198 pixels tall.
// Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
set_post_thumbnail_size($custom_header_support['width'], $custom_header_support['height'], true);