WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#18108 closed enhancement (duplicate)

Custom code for different post formats in twentyeleven

Reported by: murky Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

I wanted to be able to customise the post format in twentyeleven, but regardless of the format, content-single was used.

Therefore, in single.php changing the line

<?php get_template_part( 'content', 'single' ); ?>

to

get_template_part( 'content-single', get_post_format() ); ?>

would maintain current behaviour, but would allow a child theme to override behaviour for certain post formats by adding content-single-status.php (and so on).

Attachments (1)

singleformat.patch (1.1 KB) - added by murky 10 years ago.
Patch file (generated using 'diff' - hope I've done it right!

Download all attachments as: .zip

Change History (4)

@murky
10 years ago

Patch file (generated using 'diff' - hope I've done it right!

#1 @dd32
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #17996

I'd propose your alternate solution over there.

#2 @dd32
10 years ago

  • Component changed from Themes to Bundled Theme

#3 @murky
10 years ago

Wilco

Note: See TracTickets for help on using tickets.