Removing URL and adding container around image in the featured image metabox

I am not sure why you want to do this, but you can accomplish it with preg_replace(). Try adding this to your theme’s functions.php: add_filter( ‘admin_post_thumbnail_html’, ‘remove_featured_image_link’ ); function remove_featured_image_link($content) { $content_edit = preg_replace(‘/<a .*?class=”(.*?thickbox.*?)”>(.*?)<\/a>/’,'<div>$2</div>’,$content); return $content_edit; }

Generate responsive post thumbnails of same size

Install plugin: https://wordpress.org/plugins/force-regenerate-thumbnails/ and regenerate all thumbnails. Or steps: Create new dimension for images: add_image_size (‘thumb-cropped’, 227, 133, true); // Set necessary sizes (true = cropped) Get images with the sizes in you function. get_the_post_thumbnail($post->ID); fix to: get_the_post_thumbnail($post->ID, ‘thumb-cropped’); Install plugin: https://wordpress.org/plugins/force-regenerate-thumbnails/ Inter in admin area and regenerate all thumbnails The end. Use all new … Read more

How to pick “full/thumbnail” images in the loop?

Try just using the traditional $i iterator (untested) but I can’t see why this wouldn’t work.. <?php $i = 0; while ( have_posts() ) : the_post(); $i++; if ( $i == 1 ): ?> <!– First Post –> <div id=”post”> <a class=”post_image” href=”https://wordpress.stackexchange.com/questions/165568/<?php the_permalink(); ?>” title=”<?php the_title(); ?>”> <?php if ( has_post_thumbnail() ): ?> <?php … Read more

Comparison Operators not working for conditional author post thumbnails

You are using wrong Comparison Operators. Use else if($author_id == “2”) { instead of else if($author_id = “2”) { Edit: Try adding trailing slash after get_stylesheet_directory_uri function. its missing in your code. <img src=”https://wordpress.stackexchange.com/questions/166850/<?php echo get_stylesheet_directory_uri() ?>/images/default-thumb.jpg” alt=”” title=”” width=”” height=”” />