kimpeartgratton
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Theme helpI have asked a couple of questions, but no real help has arisen.
Thanks wpyogi for clarifying the situation – I shall go pester the genesis folk.
Kim
Forum: Plugins
In reply to: [MC4WP: Mailchimp for WordPress] Label Styling – help…Thank you Danny!
I’m a happy camper now.
Kim
Forum: Fixing WordPress
In reply to: New Image SizeHa ha – worked it out.
So, for anyone else like me who wants to create new image sizes accessible from the Media Library:
1. open your functions.php file (inside theme folder).
2. Add theme support by pasting in:
add_theme_support( 'post-thumbnails' );
3. Add image sizes by pasting in:
add_image_size( 'your-image-size-name', 120, 120, true ); // Hard crop add_image_size( 'your-image-size-name', 600, 400 ); // Soft crop
4. Add to Media Library by pasting in:
add_filter( 'image_size_names_choose', 'my_custom_sizes' ); function my_custom_sizes( $sizes ) { return array_merge( $sizes, array( 'your-custom-size' => __('Your Custom Size Name'), ) ); }
Further reading:
https://codex.www.ads-software.com/Function_Reference/add_image_sizehttps://codex.www.ads-software.com/Plugin_API/Filter_Reference/image_size_names_choose
Forum: Fixing WordPress
In reply to: New Image SizeThis looks like what I want to do, but where oh where does it go?
For Media Library Images (Admin)
You can also make your custom sizes selectable from your WordPress admin. To do so, you have to use the image_size_names_choose hook to assign them a normal, human-readable name…add_filter( ‘image_size_names_choose’, ‘my_custom_sizes’ );
function my_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
‘your-custom-size’ => __( ‘Your Custom Size Name’ ),
) );
}Forum: Fixing WordPress
In reply to: New Image SizeThank you for replying.
I had read the wordpress section you linked to.
I had already carried out the first two parts of the instructions, but I am lost of the last bit.
When you say, “…put this code in the theme…” What do you mean? I want to be able to use the new sizes in blog posts, in the main content.
Thanks again.
Kim