Featured Images for Posts but not Pages? (3 posts)

  1. Sora57
    Posted 3 years ago #

    There is a "set featured image" option for my posts but not my pages. I want to be able to set featured images for my pages.

    I know I have to do something to the loop in the index.php file, because that's the one that works for static pages?

    Below is the code for what I think is the loop part on the index.php page.

    Total n00b...what do I do from here?

    					/* Run the loop to output the page.
    					 * If you want to overload this in a child theme then include a file
    					 * called loop-page.php and that will be used instead.
    					//get_template_part( 'loop', 'page' );
    						if ( have_posts() ) : while ( have_posts() ) : the_post();
  2. If you want to add a featured image to that code, you'll need to use the_post_thumbnail function.

    Have a look at the details and examples here - http://codex.wordpress.org/Function_Reference/the_post_thumbnail

  3. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

    also check the 'screen options' tab near the top right on the 'edit page' page in the dashboard, and make sure 'Featured Image' is ticked.

Topic Closed

This topic has been closed to new replies.

About this Topic