WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#22943 closed defect (bug) (fixed)

Twenty Twelve: show featured images single page view

Reported by: tomontoast Owned by: lancewillett
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.5
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

Twenty Twelve theme is reporting featured images can be used on pages which is not the case. Users can add featured images to pages but these don't show up in the theme as the user would expect.

See support thread http://wordpress.org/support/topic/2012-featured-image-not-showing-in-body-of-page-or-post?replies=17

The patch is a simple change in the functions file from

add_theme_support( 'post-thumbnails' );


to

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

Attachments (3)

22943.diff (1.1 KB) - added by MikeHansenMe 5 years ago.
show featured image on pages
22943.2.diff (481 bytes) - added by MikeHansenMe 5 years ago.
New patch that leaves support open for other post types
22943.3.patch (577 bytes) - added by lancewillett 5 years ago.
Fixes issue with duplicate image in front page template display

Download all attachments as: .zip

Change History (12)

#1 @MikeHansenMe
5 years ago

I would think they should work on Pages as well as Posts.

@MikeHansenMe
5 years ago

show featured image on pages

#2 @MikeHansenMe
5 years ago

  • Cc mdhansen@… added

#3 @DrewAPicture
5 years ago

  • Cc xoodrew@… added

#4 @obenland
5 years ago

  • Milestone changed from Awaiting Review to 3.6
  • Severity changed from minor to normal

Very interesting, nice catch!

From the inline documentation in current_theme_supports():

If no array was passed, then any type is accepted

I agree with MikeHansenMe, it should work also on pages. I'm not sure whether we want to restrict it to post and pages, though.

#5 @tomontoast
5 years ago

  • Cc tomontoast added

I agree, users expect featured images to work on pages as they did in twenty eleven.

Another forum thread http://wordpress.org/support/topic/featured-image-for-pages?replies=3

What types of page other than posts and pages would you want featured images to work on?

@MikeHansenMe
5 years ago

New patch that leaves support open for other post types

#6 @lancewillett
5 years ago

  • Summary changed from Twenty Twelve theme reporting featured images can be used on pages to Twenty Twelve: show featured images single page view

#7 @lancewillett
5 years ago

  • Owner set to lancewillett
  • Resolution set to fixed
  • Status changed from new to closed

In 23471:

Twenty Twelve: show featured image in single page views. Fixes #22943, props MikeHansenMe.

#8 @lancewillett
5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Found a small issue, reported on WP.com sites, example here: https://twentytwelvedemo.wordpress.com/

Screenshot: http://d.pr/i/wgbF/1PI95pEn

Two featured images in the case a page has a featured image *and* it's set to front static page, *and* it's using the Front Page Template.

@lancewillett
5 years ago

Fixes issue with duplicate image in front page template display

#9 @lancewillett
5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 23561:

Twenty Twelve: fix double featured images in Front Page Template, closes #22943.

Note: See TracTickets for help on using tickets.