WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21245 closed enhancement (fixed)

Twenty Twelve: Homepage page template

Reported by: obenland Owned by: lancewillett
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

So I looked at the code of homepage.php and wondered whether there would be a better solution to altering the display of text than echoing a class name after a conditional.

The code I came up with, doesn't change the end appearance but reuses the content-page.php template, reduces the CSS a little and removes the addition of an unused body class.

I know it's a lot of changes, but I think it is worth it.

Attachments (2)

21245.diff (4.3 KB) - added by obenland 3 years ago.
21245.2.diff (3.6 KB) - added by obenland 3 years ago.
Refresh

Download all attachments as: .zip

Change History (7)

@obenland3 years ago

comment:1 @SergeyBiryukov3 years ago

  • Milestone changed from Awaiting Review to 3.5

comment:2 follow-up: @lancewillett3 years ago

The full-width class is still needed, but shows me we're missing a CSS rule for it. :)

It should be there for posts and pages where the site has zero active widgets. In that case the layout should go full-width, 100% with no sidebar.

I'm not sure about the homepage rework, I'll take a closer look in a day or two.

comment:3 in reply to: ↑ 2 @obenland3 years ago

Replying to lancewillett:

The full-width class is still needed, but shows me we're missing a CSS rule for it. :)

I opened #21254 to address it

@obenland3 years ago

Refresh

comment:4 @lancewillett3 years ago

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

In [21398]:

Twenty Twelve: Homepage page template logic cleanup and style updates, props obenland. Fixes #21245.

comment:5 @lancewillett3 years ago

  • Keywords dev-feedback removed
Note: See TracTickets for help on using tickets.