Custom image sizes only for thumbnails

https://github.com/crstauf/WordPress-FeaturedImage-SpecialImageSize try this out; wrote it myself a long time ago. I do have an updated version, coming out soon. let me know if you’ve any questions. as requested, relevant code for functions.php of your theme: // `post_type` => array(width,height,crop) $featimg_sizes = array( ‘post’ => array(50,20,false) ); add_action(‘wp_ajax_set-post-thumbnail’,’generate_featimg_size’,1); function generate_featimg_size() { global $featimg_sizes; $thumbnail_id = … Read more

Cannot get full thumbnail size using the_post_thumbnail

Try to add custom thumbnail size with unlimited(very big) hegiht and width in functions.php with following code: add_theme_support( ‘post-thumbnails’ ); add_image_size( ‘custom’, 9999, 9999 ); It will not crop any images. So you can use it as the_post_thumbnail( ‘custom’ ); This method looks rough but you can use if other ways don’t work. And if … Read more

Media thumbnail for custom post inside post content

@Ibraheem, you don’t have to use global $post, since it is in global. To check post type you can use get_post_type(). Using the_post_thumbnail is not properly implemented in this case, instead use get_the_post_thumbnail. Note: you can’t use has_post_thumbnail as tag condition if you are not set featured image. add_filter( ‘the_content’, ‘put_thumbnail_in_posting’ ); function put_thumbnail_in_posting( $content … Read more

How to make programmatic image upload generate thumbnail and sizes?

In order for wp_generate_attachment_metadata() to work properly in that it creates a thumbnail and other intermediate/image sizes like medium and large, the image attachment/post data must have the proper MIME type (post_mime_type), and despite you did set it in your $attachment array (the post data), there’s a problem with this part in your code: $wp_filetype … Read more

Add_image_size not cropping

From this comment: Sry, i forgot it, but i want size of 645×445, exactly, and that image dont have it. The width of it is 588px. Look: img201.imageshack.us/img201/4728/40405258.png WordPress need make a zoom on it. WordPress does not zoom. It only crops. If you want an image to have a custom intermediate size, then you … Read more

Additional image sizes are not being generated

From https://make.wordpress.org/core/2012/12/06/wp_image_editor-is-incoming/ : Imagick support requires Imagick 2.2.0+ compiled against Imagemagick 6.2.9+, for full support. If the required functions aren’t available, WordPress will default back to GD. If you can, create a PHP file somewhere on your server with this content: <?php phpinfo(); ?>. Then load the page and see if there is a section … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)