WordPress.org

Ready to get started?Download WordPress

Codex

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

Function Reference/get post type archive feed link

Contents

Description

Retrieve the permalink for a post type archive.

Usage

<?php get_post_type_archive_feed_link( $post_type, $feed = '' ); ?>

Parameters

$post_type
(string) (required) Post type
Default: None
$feed
(string) (optional) Feed type
Default: None

If $feed is empty, the result of get_default_feed() is used (the default feed is 'rss2', unless it is changed via the default_feed filter).

Return Values

(string) 
the permalink for a post type archive feed.

Examples

Notes

Change Log

Since: 3.1.0

Source File

get_post_type_archive_feed_link() is located in wp-includes/link-template.php.

Related