WordPress.org

Ready to get started?Download WordPress

Forums

Problem with thumbnails (1 post)

  1. Ant94
    Member
    Posted 1 year ago #

    if ( function_exists( 'add_theme_support' ) ) {
    	add_theme_support( 'post-thumbnails' );
            set_post_thumbnail_size( 150, 150, true );
    }
    <div class="news_img">
    					<?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'single-post', array('class' => 'news_img') ); } ?>
    					</div>
    div.news_img {
    
    	width: 150px;
    	height: 150px;
    	float: left;
    
    	padding: 10px;
    
    }
    
    div.news_img img {	
    
    	border: solid black thin;	
    
    	display: block;
    	margin: 0 auto;
    }

    The problem is that I can't make any thumbnail during writing the post because when I choose: Use as featured image i get the answer: Could not set that as the thumbnail image. Try a different attachment.

    What should I do? Where is the problem?

Topic Closed

This topic has been closed to new replies.

About this Topic