WordPress.org

Ready to get started?Download WordPress

Forums

Twenty twelve featured image (14 posts)

  1. dgrylas
    Member
    Posted 1 year ago #

    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

  2. alchymyth
    Forum Moderator
    Posted 1 year ago #

    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?

  3. dgrylas
    Member
    Posted 1 year ago #

    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.

  4. paulwpxp
    Font hero
    Posted 1 year ago #

    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.php

    Also 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

  5. alchymyth
    Forum Moderator
    Posted 1 year ago #

    @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.

    @dgrylas

    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>
  6. dgrylas
    Member
    Posted 1 year ago #

    so I added this, now the feature image shows up under the main banner image. I want it to replace the banner image?

  7. dgrylas
    Member
    Posted 1 year ago #

    Still looking for a solution. Tried Dynamic Headers by Nicasio Design plugin but still no luck. I will deactivate the plugin.

  8. paulwpxp
    Font hero
    Posted 1 year ago #

    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.

  9. alchymyth
    Forum Moderator
    Posted 1 year ago #

    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

  10. dgrylas
    Member
    Posted 1 year ago #

    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

  11. dgrylas
    Member
    Posted 1 year ago #

    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

  12. dgrylas
    Member
    Posted 1 year ago #

    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!

  13. dgrylas
    Member
    Posted 7 months ago #

    Just updated twenty twelve, broke child theme and feature image showing up twice again?
    How can I fix this?

  14. dgrylas
    Member
    Posted 7 months ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.