add_feed [ WordPress Function ]
add_feed ( $feedname, $function )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Add a new feed type like /atom1/.
Source
<?php
function add_feed($feedname, $function) {
global $wp_rewrite;
if ( ! in_array($feedname, $wp_rewrite->feeds) ) //override the file if it is
$wp_rewrite->feeds[] = $feedname;
$hook = 'do_feed_' . $feedname;
// Remove default function hook
remove_action($hook, $hook, 10, 1);
add_action($hook, $function, 10, 1);
return $hook;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Rewrite API/add feed « WordPress Codex
Rewrite API/add feed ... Source File. add_feed() is located in wp-includes/rewrite. php ... Retrieved from "http://codex.wordpress.org/Rewrite_API/add_feed" ...
codex.wordpress.org - Custom Feeds in WordPress | x + 3
Oct 30, 2008 ... Everything revolves around the add_feed function. This function takes two arguments: a name for your feed and a function to call to create the ...
xplus3.net - rss - Cannot get add_feed to work - WordPress - Stack Exchange
Mar 22, 2012 ... I want to add a custom feed on my site for SEO purposes. So, I first copy the /wp- includes/feed-rss2.php file into my theme folder and renamed it ...
wordpress.stackexchange.com - Frank Verhoeven – Create an RSS Feed with WordPress
Oct 6, 2008 ... This is the add_feed function. ... So lets say we name our feed: 'guestbook', then we should call the add_feed function this way: 1 2 3 4 5 6 7 ...
www.frank-verhoeven.com
Kullanýcý Tartýþmalarý [ wordpress.org ]
- wp_newb on "Help please!!! Custom feed error "....is not a valid feed template.""
- AITpro on "[Plugin: podPress] Server returned HTTP Error 403: Forbidden"
- ntm on "[Plugin: podPress] Server returned HTTP Error 403: Forbidden"
- AITpro on "[Plugin: podPress] Server returned HTTP Error 403: Forbidden"
- AITpro on "[Plugin: podPress] Server returned HTTP Error 403: Forbidden"
- AITpro on "[Plugin: podPress] Server returned HTTP Error 403: Forbidden"
- ntm on "[Plugin: podPress] Server returned HTTP Error 403: Forbidden"
- AITpro on "[Plugin: podPress] Server returned HTTP Error 403: Forbidden"
- raymer on "[Plugin: podPress] Server returned HTTP Error 403: Forbidden"
- AITpro on "[Plugin: podPress] Server returned HTTP Error 403: Forbidden"