Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#13751 closed defect (bug) (fixed)

Unable to filter title tag on 404 pages in TwentyTen.

Reported by: mfields's profile mfields Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Themes Keywords: has-patch commit
Focuses: Cc:


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)

twentyten.header.php.diff (702 bytes) - added by mfields 14 years ago.
13751.diff (6.3 KB) - added by nacin 14 years ago.
13751.2.diff (9.3 KB) - added by nacin 14 years ago.
aioseop.diff (1.0 KB) - added by nacin 14 years ago.

Download all attachments as: .zip

Change History (10)

14 years ago

#1 @nacin
14 years ago

  • Keywords has-patch commit added
  • Milestone changed from Unassigned to 3.0

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).

#2 @mfields
14 years ago

Awesome! Thanks for removing the excess whitespace from the title tag as well, this was bothering me as well.

14 years ago

#3 @nacin
14 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.

#4 @nacin
14 years ago

(In [15195]) Use wp_title() proper in Twenty Ten, and move the janky stuff to a filter. see #13751.

#5 @nacin
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [15196]) Improve the custom background front-end callback. Also, background-attachment should default to scroll, not fixed. fixes #13751.

14 years ago

#6 @hallsofmontezuma
14 years ago

yay for aioseop.diff

Note: See TracTickets for help on using tickets.