8

How to hide the image shown in Wordpress Single Post

 3 years ago
source link: https://www.codesd.com/item/how-to-hide-the-image-shown-in-wordpress-single-post.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

How to hide the image shown in Wordpress Single Post

advertisements

I want to hide the featured image in the post page, but not on the home page.
I had a look at the other posts about this same problem, but they didn't work for me, so I will appreciate your help.

Here is my single.php

<div id="primary" class="full-width-page">
    <main id="main" class="site-main" role="main">

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

        <?php get_template_part( 'content', 'single' ); ?>

        <?php tesseract_post_nav(); ?>

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

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

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


Please, write what theme you are using. According to what you wrote you have to edit content-single.php. Search for the line like this:

get_the_post_thumbnail( $post->ID, ... );

the_post_thumbnail();

And remove or comment it.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK