Confusion about arguments sent to add_image_size

As @PieterGoosen said, your point is valid. A look into the source confirms that the codex description of add_image_size was wrong there. It was, because I changed it to be correct. That said, everyone can help improving the codex, you just need to register. You might want to take a look at Contributing to WordPress … Read more

Plupload resize for worpdress

I’ve done a Plupload using the Front End. The WordPress Plupload is very customised, so I’ve implemented from the scratch as a Plugin. I’ll show an example using functions.php Download the Plupload from http://www.plupload.com/download/ and put in your theme inside a js/thirdparty/plupload/{all_files} Code to use on functions.php //Plupload File wp_enqueue_script( ‘plupload’, get_template_directory_uri() . ‘/js/thirdparty/plupload/js/plupload.full.min.js’, array( … Read more

How to show only posts with images?

No need for post IDs what has no thumbnail. Use meta query to get only those what has thumbnail. Add meta query function get_only_posts_with_images( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( ‘meta_query’, array( array( ‘key’ => ‘_thumbnail_id’ ) ) ); } } add_action( ‘pre_get_posts’, ‘get_only_posts_with_images’ ); Or use custom query. $query … Read more

Featured image (responsive) above content is too small after update to WordPress 4.4

How can the global $content_width affect the post thumbnail ? Let’s check how the global $content_width can affect the output of the_post_thumbnail( ‘large’ ) and trace out the relevant function dependencies: the_post_thumbnail() \ \__ get_the_post_thumbnail() \ \__ wp_get_attachment_image() \ \__ wp_get_attachment_image_src() \ \__ image_downsize() \ \__ image_constrain_size_for_editor() and for the large size we have specifically … Read more

Rename media files generated during upload

Using my own code from here, i updated the logic to add the name of the image size instead of the suffix, try adding this to your functions.php file: add_filter(“wp_image_editors”, “my_wp_image_editors”); function my_wp_image_editors($editors) { array_unshift($editors, “WP_Image_Editor_Custom”); return $editors; } // Include the existing classes first in order to extend them. require_once ABSPATH . WPINC . … Read more

Local WordPress installation doesn’t crop images

For the record since I ended up here when experiencing the same issue on my localhost: In php.ini, Uncomment the line with: extension=php_gd2.dll Restart apache / all services This sorted it out for me (I may have switched a few other services on while I was there, but I believe this is what fixed it!)

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