我已经浏览了我在这里找到的每个解决方案,仍然无法获得我的"特色"图像来显示它的正确大小,不断地将其强制为wp默认的150x110像素.
我已经进入了wp/settings/media并更改了缩略图大小...没有变化我已经进入了图库/精选图像并关闭了所有其他尺寸,除了原版...没有变化我已经进入我的functions.php文件并更改了所谓的调用大小..
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'homepage-thumb' );
set_post_thumbnail_size( 420, 110 ); // default Post Thumbnail dimensions
}
if ( function_exists( 'add_image_size' ) ) {
add_image_size( 'category-thumb', 420, 9999 ); //300 pixels wide (and unlimited height)
add_image_size( 'homepage-thumb',420, 110, true ); //(cropped)
}
Run Code Online (Sandbox Code Playgroud)
在我的索引文件中,我有......
<?php if(has_post_thumbnail()) {echo '<a href="'.get_permalink().'">';echo get_the_post_thumbnail($post->ID, array(420,110) );echo '</a>';} ?>
Run Code Online (Sandbox Code Playgroud)
但仍然没有..
当我在firebug中检查元素时,我看到了:
<img class="attachment-420x110 wp-post-image" width="150" height="110" title="t-test2" alt="t-test2" src="http://pixelneer.com/wp-content/uploads/2012/01/t-test2-150x110.png">
Run Code Online (Sandbox Code Playgroud)
所以它仍然从其他地方得到了defundert thunbnail大小,我不知所措.
我正在使用标记,URL是pixelneer
wordpress ×1