Regenerate thumnails does not create any files

The solution for this problem was rather strange. I hired a developer who helped me solve this: increased memory limit in config.php (not sure if this was causing the problem since it didn’t look like a time-out or anything) in the file regenerate-thumbnail.php the line wp_update_attachment_metadata( $image->ID, $metadata ); was commented. I’m sure I did … Read more

How to display first post thumbnail as a background image of a widget?

Few notes: Just use the_title(); instead of echo get_the_title(); Use the_title_attribute() for title attributes. No need to override the global $wp_query when you use a secondary query. Then use wp_reset_postdata() after your secondary query loop. Use the_permalink() that escapes the permalink, instead of the unescaped echo get_permalink(); There’s the has_post_thumbnail() to check if the post … Read more

How to use thumbnail size of image if I’m only using src to get image

Since you are using get_sub_field() i assume you are inside a have_rows() (a repeater), in theory it should work like this: $image = get_sub_field(‘image’); <img src=”https://wordpress.stackexchange.com/questions/278286/<?php echo $image[“url’]; ?>” alt=”https://wordpress.stackexchange.com/questions/278286/<?php echo $image[“alt’] ?>” /> and this is what you can get: $image[‘url’] //this is the full image echo $image[‘sizes’][‘medium’]; //medium image echo $image[‘sizes’][‘thumbnail’]; //thumbnail image … Read more

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