Opened 10 years ago
Closed 9 years ago
#17996 closed defect (bug) (fixed)
Twenty Eleven: allow content-single.php to be overridden for post formats
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.2 |
Component: | Bundled Theme | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
From single.php Line 23:
<?php get_template_part( 'content', 'single' ); ?>
To:
<?php get_template_part( 'content', get_post_format() ); ?>
Attachments (4)
Change History (14)
#1
@
10 years ago
- Cc coenjacobs@… added
- Keywords needs-testing ui-feedback added
Seems to be true. Don't know why this has never been discovered before.
#3
@
10 years ago
I'm not 100% sure, but I believe that this is intentional. The TwentyEleven post format templates (content-aside.php
, content-gallery.php
, content-image.php
etc) contain the following comment at the top:
The template for displaying posts in the ... Post Format on index and archive pages
This seems to imply that they are not intended to be used on single post pages.
#4
@
10 years ago
The default templates doesn't display correct on single pages cause they have the excerpt instead of the full content into the_content()... maybe it's intentional.
#5
@
10 years ago
I've just done a patch for this....
http://core.trac.wordpress.org/ticket/18108
It maintains current behaviour - but allows an option to over-ride in a child theme.
@
10 years ago
Patch which maintains current behaviour - but allows child theme to over-ride if wanted
#6
@
10 years ago
- Cc murkee@… added
If I've understood this properly (still learning!), the advantage of my suggested patch as that it doesn't require other files in the theme to be updated.
(Update: I've just found out how to do the patch properly - will resubmit soon)
@
10 years ago
A patch which preserves current behaviour, but facilitates the addition of being able to use different post formats on single pages by adding content-single-status.php and similar
#7
@
9 years ago
I like 17966b.diff. ian or lance?
Added post format to get template part call