• Resolved danielle_r

    (@danielle_r)


    Hi,

    I’m using the featured image feature to select a picture that will appear in the list view of my pages. This works fine. Except later I discovered that this theme also automatically puts a big image (the selected featured image) in the post. I’ve discovered no way of avoid this using some settings.
    So I’ve tried disabling it in the code of content.php of the theme like this:

    <header class="entry-header">
    			<?php
    				// the_post_thumbnail();
    			?>

    Unfortunately the image is still showing.
    Is this setting overruled by the parent theme? I would prefer not to mess with the parent theme as my client will want to update the theme. Is there a way to avoid the featured image from showing up in the post?

    Any help is greatly appreciated, best, danielle.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I would prefer not to mess with the parent theme

    the parent theme would be Twenty Twelve which you rightly should not edit;
    which has a content-page.php for pages;

    copy that file into your child theme (accessible-onetwo) and edit it there – unless you can find a CSS way to hide the featured image in the pages (?);

    someting like this untested style:
    .page .entry-header img { display: none; }

    Theme Author Daniel Davis

    (@tagawa)

    Thanks for answering, alchymyth.

    danielle – I’d rather not make this change to the main child theme myself as other users may still want the big featured image. But in your copy of the child theme you could copy the content-page.php file and edit that, as alchymyth suggested, so it overrides the parent theme’s file.

    Using CSS is also a good idea but the browser will still load the big image even if it’s not displayed, so it will affect performance a bit.

    Thread Starter danielle_r

    (@danielle_r)

    Thanks both of you for your responses, they are very helpful.

    You’ve actually made me aware of a problem. In my example I used a picture that wasn’t in the article, only in the uploaded images. Once I selected it as a featured image it suddenly appeared in the article. But you are right, often the client will want to pick an image that is also featured in the article. Is there a way to distinguish between the two cases?

    Thanks very much in advance, best, d

    Thread Starter danielle_r

    (@danielle_r)

    Aiai, I’m testing now with adding a featured image. I now include the image in the page and later selected it as the featured image. I still puts the image right at the top of the page. One can still add the image to the article so perhaps I should consider removing the code from the child theme’s template.

    Strange, this automatic adding to the top of the page wasn’t the case in previous version of the standard WP theme…?

    I’m open to any other suggestions. Tnx, d

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘featured image shows in pages’ is closed to new replies.