WordPress.org

Ready to get started?Download WordPress

Codex

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

Rewrite API/add feed

Description

Add a new feed type like /atom1/.

Requires one-time use of flush_rules() to take effect.

Usage

<?php add_feed$feedname$function ); ?> Use the init action to call this function.

Parameters

$feedname
(string) (required) Name of the feed as it will appear in the feed URL
Default: None
$function
(callback) (required) Callback to run on feed display.
Default: None

Return Values

(string) 
Feed action name.

Change Log

Since: 2.1

Source File

add_feed() is located in wp-includes/rewrite.php

Related

Articles

Hooks

Functions