Last active
May 16, 2023 06:05
-
-
Save messica/960b6365905a91a2a68b to your computer and use it in GitHub Desktop.
pmpromrss_feeds filter example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* PMPro RSS Extra Feeds Example | |
* | |
* Extra feeds format: | |
* $feeds["Label"] = Feed URL | |
* | |
* learn more about feed URLs at http://codex.wordpress.org/WordPress_Feeds | |
*/ | |
function my_pmpromrss_feeds($feeds) { | |
//recent posts by current user | |
global $current_user; | |
$feeds['My Recent Posts'] = pmpromrss_url(home_url('/author/' . $current_user->user_login . '/feed/')); | |
//recent posts from "members" category | |
$feeds['Members Feed'] = pmpromrss_url(home_url('/category/members/feed')); | |
return $feeds; | |
} | |
add_action('pmpromrss_feeds', 'my_pmpromrss_feeds'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment