#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)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Patch file (generated using 'diff' - hope I've done it right!