Last active
August 27, 2021 16:22
-
-
Save jirsbek/acbafacae90906e2e43a7db0f31743c9 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Add Param to Show Number of Posts in RSS | |
* | |
* Source: https://wordpress.stackexchange.com/questions/4736/get-all-posts-in-rss | |
*/ | |
add_filter('option_posts_per_rss', 'my_posts_per_rss'); | |
function my_posts_per_rss($option) | |
{ | |
if (isset($_GET['posts'])) { | |
return (int) $_GET['posts'] ?: $option; | |
} | |
return $option; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment