Change theme’s thumbnail to cropped WP featured image

Check out get_the_post_thumbnail() $image_thumb = get_the_post_thumbnail( get_the_ID(), ‘thumbnail’); Here’s a more specific example: while (have_posts()) : the_post(); echo ‘<article class=”search-entry clearfix”>’; $image_thumb = get_the_post_thumbnail( get_the_ID(), ‘thumbnail’); echo ( $image_thumb ) ? sprintf(‘<a href=”https://wordpress.stackexchange.com/questions/168885/%s” title=”https://wordpress.stackexchange.com/questions/168885/%s” class=”search-portfolio-thumb”>%s</a>’, get_permalink(), get_the_title(), $image_thumb) : ”;

Background image not showing up

You did not create your header.php properly. You did not include HTML doctype declaration and head section. So here is your header.php <!doctype html> <html <?php language_attributes(); ?> class=”no-js”> <head> <meta charset=”<?php bloginfo(‘charset’); ?>”> <title><?php wp_title(”); ?><?php if(wp_title(”, false)) { echo ‘ : ‘; } ?><?php bloginfo(‘name’); ?></title> <meta http-equiv=”X-UA-Compatible” content=”IE=edge,chrome=1″> <meta name=”description” content=”<?php bloginfo(‘description’); … Read more