• Resolved Dong Suzuki

    (@sudongyue)


    I have done some research but I still cannot fix the problem. I have an unwanted thumbnail on top of my post. I am using twenty twelve theme. This is what my post looks like:
    https://dongyuesu.com/art/portaiture/

    The problem occurs after I changed my content.php to move the thumbnail next to the post titles and excerpts in my home page. This is what my homepage looks like:
    https://dongyuesu.com/art/

    In my child theme content.php, I have removed this line
    <?php the_post_thumbnail(); ?>
    under <header class=”entry-header”>. It helps to remove the unwanted thumbnail on the home page, but the unwanted thumbnails on the post pages are still there.

    Do I need to post my content.php? I do not know how to do that though.

    Thanks in advance.

    Don

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    You will want to change the content-single as well.

    the unwanted thumbnails on the post pages are still there.

    this is because the single post uses the same content.php as the posts page;

    this is the code from the sinlge post:

    <!-- Adds the 300x300 thumbnail/featured image -->
            <div class="excerpt-thumb">
                <a href="https://dongyuesu.com/art/portaiture/" title="Permalink to (Portraiture) I Am Who I Think You Think I Am" rel="bookmark">
                <img width="300" height="200" src="https://dongyuesu.com/art/wp-content/uploads/2013/02/artlife-14-300x200.jpg" class="alignleft wp-post-image" alt="artlife-14" />            </a>
            </div>

    if you don’t want that in single posts, you need to wrap your code into a conditional statement;
    example:

    <?php if( !is_single() ) : ?>
    YOUR CODE
    <?php endif; ?>
    Thread Starter Dong Suzuki

    (@sudongyue)

    <?php if( !is_single() ) : ?>
    YOUR CODE
    <?php endif; ?>

    Thanks so much for the prompt reply!! This code resolves the problem. Thanks so much!

    One more related question:
    In my category page, the thumbnail is on top of the post title. If I want it to look like my homepage, where the thumbnail is on the left next to the post title, what should I do?

    Here is what my category page looks like:
    https://dongyuesu.com/art/category/photography/

    you only removed the ‘clear’ for the post titles in the posts page;

    .blog .entry-title, .blog .entry-header .entry-meta { clear: none; }

    extend theat to archive pages as well;

    for example, add:

    .archive .entry-title, .archive .entry-header .entry-meta { clear: none; }

    Thread Starter Dong Suzuki

    (@sudongyue)

    Thanks again. I have just done what you said, by extending the { clear: none; } to include archive, but things aren’t changed. Besides CSS, could there be somewhere else that I need to fix?

    Besides CSS, could there be somewhere else that I need to fix?

    always clear the browser cache after changes to the styles, if you want to see the results immediately.
    press ‘ctrl f5’ or ‘reload’ the web page a few times (or check your browser’s instructions)

    btw:
    I see the thumbnails to the left of the content, in the category archive.

    Thread Starter Dong Suzuki

    (@sudongyue)

    Oh yes you are right. The category archive is now showing what I want. Problem solved!
    I did refresh my browser a few times but things remained the same though. Then I switched to another computer and I saw the change. You are right that I need to clear the cache; but many other changes do not require clearing cache. That was why I had doubt. Sorry for that.

    Thanks again Alchymyth. I saw you quite active in different treads helping people. I am very grateful to your help!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to remove the thumbnail on top of my post in Twenty Twelve theme’ is closed to new replies.