Featured Image for Pages

Viewing 4 posts - 1 through 4 (of 4 total)
  • #12987
    graysb
    Participant

    Is it possible to have a featured image for pages? I am using the full-width template and want to include a header image. I don’t want to create the pages as posts.

    #12990
    Daniel Tara
    Keymaster

    In functions.php if you replace this line:

    add_theme_support( 'post-thumbnails', array( 'post' ) );

    with this:

    add_theme_support( 'post-thumbnails' );

    You’ll be able to add featured images to pages but you’ll still need to edit the template to display them.

    #12994
    graysb
    Participant

    Thanks Daniel. What code do I need to insert into the template itself to enable the display of the images?

    #12997
    Daniel Tara
    Keymaster

    the function that inserts thumbnails is the_post_thumbnail(); look how it’s done in content.php and replicate it in page.php

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.