#13751 closed defect (bug) (fixed)
Unable to filter title tag on 404 pages in TwentyTen.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Themes | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
There seems to be a bit of redundant logic in header.php which renders the "wp_title" filter useless. If the condition is removed, the title will read "Page not Found | Blog Title" for 404 pages but plugin developers will have the ability to change the value where needed.
Attachments (4)
Change History (10)
#2
@
15 years ago
Awesome! Thanks for removing the excess whitespace from the title tag as well, this was bothering me as well.
#3
@
15 years ago
Went a different route entirely. Patch now hooks into wp_title()'s filter instead. Sad ugly code to address the weakness of one of our functions now looks like happy poetic code... to address the weakness of one of our functions. :-)
As an added benefit, we're now adding page numbers to paged singular views (we were previously only checking the $paged global, but we need to check the $page global sometimes).
Quite happy with this result. This is backwards compatible for child themes in that it won't break them, though twentyten_the_page_number() is now gone so any overrides of that is now useless. But it's more friendly for child themes now.
I'm finding some of the things we're doing a bit redundant.
Patch does two things. The first would be removing redundant things that wp_title() can handle when called properly. The second is entirely unrelated, and fixes logic, formatting, and branching for displaying a custom background (and switches the background-attachment default to scroll, the CSS default).