WordPress.org

Codex

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

Function Reference/get search feed link

Description

Retrieve the permalink for the feed of the search results.

Usage

<?php echo get_search_feed_link$search_query$feed ?>

If you don't echo the function you're simply going to get a permalink to the page with no RSS feed for the search results.

Parameters

$search_query
(string) (optional) URL search query.
Default: ''
$feed
(string) (optional) Feed type.
Default: ''

Return Values

(string) 
Returns a url after the 'search_feed_link' filters have been applied.

Examples

Notes

Change Log

Since: 2.5.0

Source File

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

Related

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