Hi,
by floating I mean “does not matter on height, but need the exact width”.
The Image is 1070px wide. I put the code to the functions.php and it added options to the dropdown menu automatically. It´s in theme setup.
The whole code looks this way:
if (!function_exists('webreseni_setup')) :
function webreseni_setup()
{
load_theme_textdomain('webreseni', get_template_directory() . '/languages');
add_theme_support('post-thumbnails');
add_image_size('figure', 241, 140, TRUE);
add_image_size('recommended', 85, 9999, FALSE);
add_image_size('fb_thumb', 1200, 630, TRUE);
add_image_size('4_x_img_nahledy_mobile_app', 155, 9999, FALSE);
add_image_size('full_widthn', 956, 9999, TRUE);
add_image_size('full_widthn2', 956, 9999, false);
add_image_size('full_widthn3', 956, 9999);
add_image_size('full_widthn4', 956, 100, false);
add_image_size('full_widthn5', 956);
add_filter('image_size_names_choose', 'ml_custom_image_choose');
function ml_custom_image_choose($args)
{
global $_wp_additional_image_sizes;
// make the names human friendly by removing dashes and capitalising
foreach ($_wp_additional_image_sizes as $key => $value)
{
$custom[$key] = ucwords(str_replace('-', ' ', $key));
}
return array_merge($args, $custom);
}
// add_filter('jpeg_quality', create_function('', 'return 100;'));
// This theme uses wp_nav_menu() in one location.
register_nav_menus(array(
'primary' => __('Primary Menu', 'webreseni'),
));
// Enable support for Post Formats.
add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link'));
// Allows theme developers to link a custom stylesheet file to the TinyMCE visual editor.
function webreseni_add_editor_styles()
{
add_editor_style('custom-editor-style.css');
}
add_action('init', 'webreseni_add_editor_styles');
// Setup the WordPress core custom background feature.
add_theme_support('custom-background', apply_filters('webreseni_custom_background_args', array(
'default-color' => 'f9f9f9',
'default-image' => '',
)));
// Enable support for HTML5 markup.
add_theme_support('html5', array('comment-list', 'search-form', 'comment-form',));
}
endif; // webreseni_setup
add_action('after_setup_theme', 'webreseni_setup');
Anyway, even if I use the WordPress settings to set the sizes of a thumbnail, it only resizes to 700px wide. It almost looks like there is some width maximum, is it possible?
-
This reply was modified 8 years, 8 months ago by
masterr77.