Twenty twelve featured image
-
Featured image not working on pages. Shows in featured image tab but does not load on page it is assigned to. Any work around for this? I am also using a child theme.
Thanks
-
unless you use the ‘front page’ template for the pages, the featured image should show;
the corresponding code is in content-page.phpcan 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:
http://www.grylas.com/besi/here/
The about nav button should laod with a featured image in the banner.This one is from trunk
http://core.trac.wordpress.org/browser/trunk/wp-content/themes/twentytwelve/content-page.php<?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
http://themes.trac.wordpress.org/browser/twentytwelve/1.1.1/content-page.phpAlso does not apply to the one that comes with WP3.5.1
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-content/themes/twentytwelve/content-page.php@paulwpxp
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.php
of 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:
see http://wordpress.org/support/topic/different-featured-header-images?replies=3#post-3353148
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.phpAfter 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?I found a plugin that seems to be a solution for using different Header images on each page. Its called Unique Headers. Seems to work great. Any feedback about using this plugin would be appreciated.
- The topic ‘Twenty twelve featured image’ is closed to new replies.