How do you modify the HTML output of a Gallery item (using the gallery shortcode)?

Let’s assume that your theme is NOT rolling its own gallery shortcode, and let’s assume that you’re using the shortcode rather than the ‘gallery’ post format here. What you’re looking for is the ‘gallery_shortcode’ function within wp-includes/media.php around line 750 (as of 3.3.1). That’s where the HTML output of your gallery items is hard-coded. Of … Read more

Strange img srcset behaviour

After some further digging, I discovered that the max srcset size in WordPress 4.4 is set to 1600px wide by default. You can fix this by adding the following filter: add_filter( ‘max_srcset_image_width’, ‘max_srcset_image_width’, 10 , 2 ); function max_srcset_image_width() { return 2048; } The helper function and this information is thanks to: http://aaronrutley.com/responsive-images-in-wordpress-with-acf

Which are precisely the predefined image sizes?

The defaults are Thumbnail 150×150, Medium 300×300, and Large 1024×1024. The fixed values can be changed in the admin dashboard under Settings > Media. You can also change them in your theme’s functions.php: update_option( ‘thumbnail_size_w’, 160 ); // Set Thumbnail width – default 150 update_option( ‘thumbnail_size_h’, 160 ); // Set Thumbnail height – default 150 … Read more

Graphing libraries for WordPress [closed]

Google Chart API Free service, that generates chart images (hosted and served by Google) from data in URL requests. If you need something very specific and of fixed parameters it is easy to hardcode most of it and get away without any library (and licensing issues) at all. Disadvantages: not suitable for sensitive data (passed … Read more

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