• Resolved serialspot

    (@serialspot)


    I changed my theme recently.I made a few CSS changes in order to change image sizes in front page. Now when i open a post, the featured image is not appearing. The image appears in the front page but when i open the post it is not showing up.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Lisa

    (@workingwebsites)

    Hi serialspot,

    Can you post a link to your site so we can see it?

    When changing your active theme, I would advise that you regenerate your thumbnails, this may resolve the issue you’re having.

    Force Regenerate Thumbnails

    Thread Starter serialspot

    (@serialspot)

    This actually looks like a deliberate design decision by your theme’s author; I see the same thing on the theme’s demo site. You could fix this by making a child theme and then copying this PHP into your child theme’s functions.php:

    function basic_child_thumbnail() {
    	$thumbnail_size = apply_filters( 'basic_singular_thumbnail_size', 'medium' );
    	$attributes = apply_filters( 'basic_singular_thumbnail_attr', array('class'=>'thumbnail') );
    
    	echo '<a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>" class="anons-thumbnail">';
    	the_post_thumbnail( $thumbnail_size, $attributes );
    	echo '</a>';
    }
    add_action( 'basic_before_single_content', 'basic_child_thumbnail' );
    Thread Starter serialspot

    (@serialspot)

    Hi It worked. Thanks a lot.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Featured image not showing’ is closed to new replies.