Opened 3 years ago
Closed 3 years ago
#53579 closed enhancement (wontfix)
Apparently unused condition in template-parts/content/content.php
Reported by: | SGr33n | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | |
Focuses: | template | Cc: |
Description
Hi,
On template-parts/content/content.php we have a condition {{{#!php
<?php
if ( is_singular() ) :
}}}
But looks like that the inclusion of this file never met that condition.
Change History (3)
#2
@
3 years ago
Hi there, thanks for the ticket!
This appears to apply to Twenty Nineteen and Twenty Twenty-One.
Both themes have an is_singular()
condition in the template-parts/content/content.php
file. However, both themes also have a separate template-parts/content/content-single.php
file for single posts.
So it seems that the condition is indeed unused. That said, we can't predict how these templates might be reused in child themes, so it seems safer to keep the condition just in case, I don't see any harm in it.
Note: See
TracTickets for help on using
tickets.
Hi!
Can you help me understand which theme you are referring to?