Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#38404 closed defect (bug) (fixed)

Twenty Seventeen: Hidden article tags on home page

Reported by: electricfeet's profile ElectricFeet Owned by: karmatosed's profile karmatosed
Milestone: 4.7 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch needs-testing
Focuses: Cc:

Description (last modified by karmatosed)

reat theme! Very impressed. Thanks

I'm playing around with it to see its potential and note that when a front-page panel is unused, the resulting html has (for example):

<article id="panel3" class="panel-placeholder panel twentyseventeen-panel twentyseventeen-panel3">
<span class="twentyseventeen-panel-title">Panel 3 Placeholder</span>
with

article.panel-placeholder {
    display: none;
}

.twentyseventeen-front-page.twentyseventeen-customizer #primary article.panel-placeholder {
    border: 0;
}

in the CSS.

Is this correct in terms of best practice? Could the php take care of not outputting this html rather than relying on CSS?

Attachments (3)

38404.diff (1.6 KB) - added by iv.dimova 6 years ago.
Fix for displaying the placeholder only if customizer is open
38404.2.diff (4.6 KB) - added by morettigeorgiev 6 years ago.
Hide not active articles with php
38404.3.patch (1.4 KB) - added by davidakennedy 6 years ago.
Refreshes patch since structure and output has changed. Only output placeholders in customizer preview.

Download all attachments as: .zip

Change History (9)

#1 @karmatosed
6 years ago

  • Description modified (diff)

Ticket moved over from GitHub as part of merge. There is more context here: https://github.com/WordPress/twentyseventeen/issues/339

@iv.dimova
6 years ago

Fix for displaying the placeholder only if customizer is open

#2 @iv.dimova
6 years ago

  • Keywords has-patch added; needs-patch removed
  • Resolution set to invalid
  • Status changed from new to closed

@morettigeorgiev
6 years ago

Hide not active articles with php

#3 @melchoyce
6 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

Hi @iv.dimova, please do not close tickets until patches have been committed.

#4 @iv.dimova
6 years ago

@melchoyce thanks a lot for reopening it, I didn't mean to close at all.

#5 @davidakennedy
6 years ago

  • Keywords needs-testing added

@davidakennedy
6 years ago

Refreshes patch since structure and output has changed. Only output placeholders in customizer preview.

#6 @karmatosed
6 years ago

  • Owner set to karmatosed
  • Resolution set to fixed
  • Status changed from reopened to closed

In 38998:

Twenty Seventeen: Hidden article tags on home page fix

This prevents the issue of hidden article tags on home page.

Props ElectricFeet, iv.dimova. morettigeorgiev, davidakennedy
Fixes #38404

M twentyseventeen/inc/template-tags.php
M twentyseventeen/style.css

Note: See TracTickets for help on using tickets.