How risize a thumbnail?

You should define add_image_size with fourth parameter to allow WordPress to crop your image to exact size. add_image_size ( ‘single_post’, 500, 200, true); Whether to crop images to specified height and width or resize Difference between soft and hard crop false – Soft proportional crop mode. true – Hard crop mode. array – Specify positioning … Read more

Tweak next_post_link for it to include thumbnail

If you have a look at what next_post_link you’ll see that it takes a parameter $link as the second argument: next_post_link( $format, $link, $in_same_term = false, $excluded_terms=””, $taxonomy = ‘category’ ); Your parameter for this currently doesn’t include the post thumbnail: _x( ‘%title <span class=”meta-nav”>&rarr;</span>’, ‘Next post link’, ‘nicosite’ ) So we need to add … Read more

Get post thumbnail to display favorites

get_post_thumbnail_id() only returns the ID of the thumbnail. To get the actual thumbnail you could instead use get_the_post_thumbnail() You can also get the image using it´s ID, but that requires wp_get_attachment_image( get_post_thumbnail_id(), ‘full’ )

WordPress 4.4 responsive sometimes doesn’t work

Got it working by removing the <a href> from the image. This is the proper way of doing a responsive image with a link: <a href=”https://wordpress.stackexchange.com/questions/212844/<?php the_permalink(); ?>”> <picture> <source srcset=”https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/<?php echo get_template_directory_uri(); ?>/img/noimg-499px” media=”(max-width: 599px)”> <source srcset=”https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/<?php echo get_template_directory_uri(); ?>/img/noimg-120×90.jpg” media=”(max-width: 767px)”> <source srcset=”https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/<?php echo get_template_directory_uri(); ?>/img/noimg-220×116.jpg”> <!– fallback –> <img srcset=”https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/<?php echo get_template_directory_uri(); … Read more

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