• Is there any way anyone would be able to help me remove a featured image from the single post page? I want it in the front, but when I click on the post, the image is doubled :/

    See here: https://www.mysoulcalledlife.com/2015/01/19/sparrows-book-review-martian-andy-weir/

    Here is the code that is presently under the single.php section of the Edit CSS remote window:

    <?php
    /**
    * The Template for displaying all single posts.
    *
    * @package Seller
    */

    get_header(); ?>

    <div class=”header-title col-md-12″>
    <SPAN><?php the_title(); ?></SPAN>
    </div>
    <div id=”primary-mono” class=”content-area col-md-8″>
    <main id=”main” class=”site-main” role=”main”>

    <?php while ( have_posts() ) : the_post(); ?>

    <?php get_template_part( ‘content’, ‘single’ ); ?>

    <?php // seller_post_nav(); ?>

    <?php
    // If comments are open or we have at least one comment, load up the comment template
    if ( comments_open() || ‘0’ != get_comments_number() ) :
    comments_template();
    endif;
    ?>

    <?php endwhile; // end of the loop. ?>

    </main><!– #main –>
    </div><!– #primary –>

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    What do I need to edit or remove?

Viewing 3 replies - 1 through 3 (of 3 total)
  • tsagita

    (@lemurianisindonesia)

    featured image code is saved in content.php

    try to delete this line
    echo get_the_post_thumbnail(blablablabla);

    hope this work ^_^

    Thread Starter Sparrowhawk24

    (@sparrowhawk24)

    Thank you so much for responding! I’m really new to all this so I appreciate your patience.

    So this is what I have under content.php

    <?php
    /**
    * @package Seller
    */
    ?>

    <article id=”post-<?php the_ID(); ?>” <?php post_class(‘row’); ?>>
    <?php if (has_post_thumbnail()) : ?>

    <div class=”featured-thumb col-md-4″>
    <?php the_post_thumbnail(); ?>
    </div><!–.featured-thumb–>

    <div class=”after-thumb col-md-8″>

    <?php else: ?>

    <div class=”after-thumb col-md-12″>

    <?php endif; ?>

    <header class=”entry-header”>
    <h1 class=”entry-title”>” rel=”bookmark”><?php the_title(); ?></h1>
    </header><!– .entry-header –>

    <div class=”entry-content”>
    <?php the_excerpt(); ?>
    <?php
    wp_link_pages( array(
    ‘before’ => ‘<div class=”page-links”>’ . __( ‘Pages:’, ‘seller’ ),
    ‘after’ => ‘</div>’,
    ) );
    ?>
    </div><!– .entry-content –>

    </div><!–.after-thumb–>
    </article><!– #post-## –>

    What should I remove?

    My guess would be to remove this part:

    <?php if (has_post_thumbnail()) : ?>
    
    <div class="featured-thumb col-md-4">
    <?php the_post_thumbnail(); ?>
    </div><!--.featured-thumb-->
    
    <div class="after-thumb col-md-8">
    
    <?php else: ?>
    
    <div class="after-thumb col-md-12">
    
    <?php endif; ?>

    I know in my 2012 Child Theme I had to comment out the following to prevent the featured image from always showing in the post:

    <header class="entry-header">
    			<?php
             // this was causing the featured image to show in the post:
             /* if ( ! post_password_required() && ! is_attachment() ) :
    				the_post_thumbnail();
    			endif;
             */ ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove Featured Image From Single Post’ is closed to new replies.