WordPress.org

Make WordPress Core

Opened 18 months ago

Closed 7 months ago

Last modified 7 months ago

#50433 closed enhancement (fixed)

Twenty Twenty: Hide extraneous elements in print.css

Reported by: kjellr Owned by: desrosj
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch has-screenshots commit
Focuses: Cc:

Description

Twenty Twenty hides many elements in the print view (e.g. the comments form, site navigation, site logo, etc.). There are still a few remaining elements that make sense to be removed too:

  • Category. This feels like an odd lead-in to the page in a printed context. In most cases, this is primarily useful for viewing more posts in that category.
  • Comment Count. The theme hides the comments in the print view, so I'm not sure that it makes sense to keep the comment count here.
  • Previous/Next posts pagination.

(In the following screenshots, the Jetpack likes + shares should be hidden too, but that may be something that the Jetpack plugin should handle itself.)

http://cldup.com/B33RQoq6Qb-1200x1200.png
http://cldup.com/4-Hwgg4dn4-1200x1200.png

Attachments (3)

50433.diff (606 bytes) - added by Hareesh Pillai 18 months ago.
Patch removes the elements in print mode
Before.png (274.4 KB) - added by Hareesh Pillai 18 months ago.
Before
After.png (138.3 KB) - added by Hareesh Pillai 18 months ago.
After applying the patch

Download all attachments as: .zip

Change History (11)

@Hareesh Pillai
18 months ago

Patch removes the elements in print mode

@Hareesh Pillai
18 months ago

Before

@Hareesh Pillai
18 months ago

After applying the patch

#1 @Hareesh Pillai
18 months ago

  • Keywords has-patch has-screenshots added

#2 @kjellr
18 months ago

Thanks, @hareesh-pillai, this patch works in my testing. ✅

#3 @Hareesh Pillai
7 months ago

  • Milestone changed from Awaiting Review to 5.8

#4 @poena
7 months ago

  • Keywords commit added

#5 @desrosj
7 months ago

  • Owner set to desrosj
  • Status changed from new to reviewing

#6 @desrosj
7 months ago

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

In 50976:

Twenty Twenty: Hide some elements for print that are not useful in that context.

This adds the comment count, previous/next posts navigation, and category link list to the list of elements hidden from the print context.

Props kjellr, hareesh-pillai, poena.
Fixes #50433.

#7 @sabernhardt
7 months ago

In addition to the three elements mentioned in the ticket description, changeset [50976] also hides the post/page Edit link (which is a good idea).

#8 @desrosj
7 months ago

@sabernhardt Ah yes, thanks for calling that out here. I meant to add that to my commit message, and it slipped my mind.

Note: See TracTickets for help on using tickets.