WordPress.org

Make WordPress Core

Ticket #22943: 22943.diff

File 22943.diff, 1.1 KB (added by MikeHansenMe, 16 months ago)

show featured image on pages

  • wp-content/themes/twentytwelve/functions.php

     
    7272        ) ); 
    7373 
    7474        // This theme uses a custom image size for featured images, displayed on "standard" posts. 
    75         add_theme_support( 'post-thumbnails' ); 
     75        add_theme_support( 'post-thumbnails', array( 'post', 'page' ) ); 
    7676        set_post_thumbnail_size( 624, 9999 ); // Unlimited height, soft crop 
    7777} 
    7878add_action( 'after_setup_theme', 'twentytwelve_setup' ); 
  • wp-content/themes/twentytwelve/content-page.php

     
    1010 
    1111        <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 
    1212                <header class="entry-header"> 
     13                        <?php the_post_thumbnail(); ?> 
    1314                        <h1 class="entry-title"><?php the_title(); ?></h1> 
    1415                </header> 
    1516