WordPress question – is this right to detect the main feed?
if ( is_feed() && !( is_archive() || is_singular() ) ) { ... }
WordPress question – is this right to detect the main feed?
if ( is_feed() && !( is_archive() || is_singular() ) ) { ... }
2 responses to “Note: WordPress question – is this right to detect t…”
What about:
if ( is_feed() && is_home()) { ... }The
is_singular()checks the site is a single post or page.Unfortunately
is_homeis false in the main feed, thus the not check. Ticket #20899 exists but hasn’t gone anywhere, I suspect a fix risks breaking a few sites.