1

I want to set a post thumbnail without setting it as featured image. My website is https://www.shockinpoop.com/. If you may, please open any article and you will see that the featured image is displaying twice. One before the post title and one immediately after it. But what I want is to make it appear like this https://www.shockinpoop.com/life-2/tyler-durden-was-right-all-along/. I want to the image to appear after the title like in this article. The only way I can do this is by removing the featured image but that removes the post thumbnail from my homepage. Also, my theme automatically attaches the image to a post when i use 'add media' button to insert an image within the post. This leads to the image appearing twice. I am extremely sorry if I am not able to explain myself. I just want the first image of the post to be used as post thumbnail, without using it as the featured image. I think this can be done by php although I am not sure. Help is greatly appreciated. Thank you. Here is the complete code of single.php

<?php while ( have_posts() ) : the_post(); ?>
    <?php
    /**
     * Allow for changing the template partial.
     *
     * @since 1.2.3.
     *
     * @param string     $type    The default template type to use.
     * @param WP_Post    $post    The post object for the current post.
     */
    $template_type = apply_filters( 'make_template_content_single', 'single', $post );
    get_template_part( 'partials/content', $template_type );
    ?>
    <?php get_template_part( 'partials/nav', 'post' ); ?>
    <?php get_template_part( 'partials/content', 'comments' ); ?>
<?php endwhile; ?>
  • right now i am not able to open any article. It redirects to the url of featured image . You need to post the code of single.php – terminator Jul 10 '15 at 20:28
  • Is there any chance I can just hide featured image from appearing only on single post page? – KANDARP MISHRA Jul 10 '15 at 20:44
  • Second featured image is also coming automatically or are you adding it from the backend? And which theme you are you using? – terminator Jul 10 '15 at 20:45
  • I am using the 'Make' theme by theme foundry. Is there a code for hiding image from single post page? – KANDARP MISHRA Jul 10 '15 at 20:47
1

You may use the css hide one of the images for now until you figure it out. Coz nothing is clear from above code

Add these lines to your style.css

.entry-header figure{
  display: none !important;
}

refresh your cache and you will the problem fixed

  • Glad could help you out . – terminator Jul 10 '15 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.