WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/is feed

Description

Can be used to determine if the current query is for a feed (e.g. RSS).

Usage

<?php
   
if ( is_feed$feeds ) ) {
      
//Do stuff
   

?>

Parameters

$feeds
(array/string) (optional) Feed type(s) to check.
Default: None

Return Values

(boolean) 
True on success, false on failure.

Examples

Notes

Change Log

Since: 1.5.0

Source File

is_feed() is located in wp-includes/query.php.

Related

See also index of Function Reference and index of Template Tags.