#51950 closed defect (bug) (fixed)
Twenty Twenty-One: Fix inconsistent HTML comments after closing HTML tags
| Reported by: | arcangelini | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.6.1 |
| Component: | Bundled Theme | Version: | 5.6 |
| Severity: | normal | Keywords: | has-patch, fixed-major, twenty-twenty-one-1.1 |
| Cc: | Focuses: | coding-standards |
Description
The post id number is missing in the code comment of the content loop. Specifically in: twentytwentyone/template-parts/content/content.php:46
</article><!-- #post-${ID} -->
Should be...
</article><!-- #post-<?php the_ID(); ?> -->
Attachments (1)
Change History (9)
#1
@
6 years ago
- Component General → Bundled Theme
- Summary Post ID missing in comments → Twenty Twenty-One: Fix inconsistent HTML comments after closing HTML tags
#2
@
6 years ago
- Keywords has-patch added
Hi @arcangelini and welcome to WordPress Core Trac,
That's a good catch.
51950.diff fixes this small issue in the following files:
- image.php
- template-parts/content/content-single.php
- template-parts/content/content.php
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi there, welcome to WordPress Trac! Thanks for the report.
Looking at the other bundled themes, they do indeed all use
<!-- #post-<?php the_ID(); ?> -->, some of them since [45209] / #46871.Looks like Twenty Twenty-One is not very consistent with this:
<!-- #post-<?php the_ID(); ?> -->intemplate-parts/content/content-page.php.<!-- #post-${ID} -->in other content templates.So I think it makes sense to bring some consistency here.