HTTP/2 301
server: nginx
date: Tue, 30 Dec 2025 09:13:25 GMT
content-type: text/html; charset=UTF-8
location: https://developer.wordpress.org/reference/functions/is_feed/
x-content-type-options: nosniff
content-language: en
x-ua-compatible: IE=Edge
vary: Accept-Encoding, Cookie
expires: Thu, 01 Jan 1970 00:00:00 GMT
cache-control: no-cache, no-store, max-age=0, must-revalidate
pragma: no-cache
alt-svc: h3=":443"; ma=86400
strict-transport-security: max-age=31536000
HTTP/2 200
server: nginx
date: Tue, 30 Dec 2025 09:13:27 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
vary: accept, content-type
link:
; rel="https://api.w.org/"
link:
; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
is_feed() – Function | Developer.WordPress.org
is_feed( string|string[] $feeds = '' ): bool
Determines whether the query is for a feed.
For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.
$feedsstring |string[] optional Feed type or array of feed types to check against.
Default:''
bool Whether the query is for a feed.
function is_feed( $feeds = '' ) {
global $wp_query;
if ( ! isset( $wp_query ) ) {
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
return false;
}
return $wp_query->is_feed( $feeds );
}
View all references View on Trac View on GitHub
Version Description 1.5.0 Introduced.
User Contributed Notes
You must log in before being able to contribute a note or feedback.