Opened 12 years ago
Closed 12 years ago
#21238 closed defect (bug) (fixed)
Twenty Twelve: Sticky badge on single view
Reported by: | obenland | Owned by: | lancewillett |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | Cc: |
Description
In Twenty Twelve the sticky badge is broken on single view.
It should either be removed entirely or fixed via CSS. The bug didn't occur in Twenty Eleven because a content-single.php
template was available.
Attachments (4)
Change History (13)
#2
follow-up:
↓ 3
@
12 years ago
- Cc xoodrew@… added
Per discussion in IRC:
In archives, it looks like the sticky post_class isn't being applied because is_home() && ! is_paged()
aren't true (per post-template.php). There's some funkiness with .featured-post
because of this this:
Index looks like this: http://cl.ly/3K0e2C192L453N3G1q0b
Archive: http://cl.ly/1T0d3W051C022N0W3D2S
#3
in reply to:
↑ 2
@
12 years ago
Lets make our lives a little easier and only check for is_home
If you're going to go that route, you might as well just mirror the checks in post-template.php by adding ! is_paged()
. There are very valid reasons you might want to highlight Featured/sticky posts outside the homepage. And besides, the lack of 'sticky' post class was the issue on archives anyway. :)
#4
@
12 years ago
Correct, the sticky "featured post" badge should only apply on the home page, when not paged.
#5
@
12 years ago
- Owner set to lancewillett
- Resolution set to fixed
- Status changed from new to closed
In [21263]:
#8
follow-up:
↓ 9
@
12 years ago
I don't really like [21263]. <article> uses post_class() which means it will receive the .sticky class if is_sticky() && is_home() && ! is_paged()
. If we can make this markup redundant, then this conditional is also redundant. I would rather rely on the existing classes than creating a new div and our own class.
#9
in reply to:
↑ 8
@
12 years ago
- Resolution set to fixed
- Status changed from reopened to closed
Replying to nacin:
I don't really like [21263]. <article> uses post_class() which means it will receive the .sticky class if
is_sticky() && is_home() && ! is_paged()
.
Chatted about this in #wordpress-dev IRC channel today, and agreed on keeping the conditional here as the solution isn't just a style hook where the post_class would be sufficient.
nacin: lancewillett: let me know if my comment on #21238 doesn't make sense nacin: lancewillett: looking at the code, it doesn't look like it makes sense lancewillett: I don't think we can use a post_class value to hide the extra markup nacin: I thought the conditional was about styling, not about an extra piece of markup. lancewillett: Some kind of logic is needed to add it in lancewillett: Right, exactly
Broken badge