unless you use the ‘front page’ template for the pages, the featured image should show;
the corresponding code is in content-page.php
can you post a link to a page with the problem?
I am just getting started on this site so not much done yet.
The link is:
The about nav button should laod with a featured image in the banner.
This one is from trunk
<?php if ( ! is_page_template( 'page-templates/front-page.php' ) ) : ?> <?php the_post_thumbnail(); ?> <?php endif; ?>
That block of code does not apply to v1.1.1 latest
Also does not apply to the one that comes with WP3.5.1
weird – I referred to my local Twenty Twelve Version: 1.1.1 which I possibly got with a 3.6 beta download (?) which contains teh conditional check.
in any case, if your theme’s content-page.php does not have this useful section, add it like here:
<header class="entry-header"> <?php if ( ! is_page_template( 'page-templates/front-page.php' ) ) : ?> <?php the_post_thumbnail(); ?> <?php endif; ?> <h1 class="entry-title"><?php the_title(); ?></h1> </header>
so I added this, now the feature image shows up under the main banner image. I want it to replace the banner image?
Still looking for a solution. Tried Dynamic Headers by Nicasio Design plugin but still no luck. I will deactivate the plugin.
A = Featured Image( aka. post thumbnail ).
B = Header Image.
In general, A is not B.
A is B only if theme does that internally, like TwentyTen or TwentyEleven.
The code in
header.phpof both theme, is what you should be looking at.
the feature image shows up under the main banner image. I want it to replace the banner image
to ‘enable’ the featured image to be the header image:
I copied code from Twenty Eleven header.php: into my child theme.
When I added “add_image_size(‘header-image’,960,196,true); //for header image”
in functions.php of the child theme my site crashed. Had to remove functions.php in my child theme. Maybe I put it in the wrong spot? Where should I be placing “add_image_size(‘header-image’,960,196,true); //for header image” in the functions.php
After removing the “add_image_size(‘header-image’,960,196,true); //for header image” in the functions.php in my child theme I went to back end of site and added feature image on a page. It did replace the banner image (yes!) but it also made a small featured image below the banner on the right
I just went to back end and changed page attribute on my page with featured image in banner from Front page template to Default Template and it worked! Not sure why but at last my featured image works as I want it to. So it looks like the solution to ‘enable’ the featured image to be the header image was to follow instructions from link “http://wordpress.org/support/topic/different-featured-header-images?replies=3#post-3353148” except I did not do the part about changing code in the functions.php
Thank you all for your patience and help!
Just updated twenty twelve, broke child theme and feature image showing up twice again?
How can I fix this?
- The topic ‘Twenty twelve featured image’ is closed to new replies.