Skip to content

Instantly share code, notes, and snippets.

@DumahX
Created November 1, 2021 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DumahX/579371bd5dae72462ec2867217b0adc4 to your computer and use it in GitHub Desktop.
Save DumahX/579371bd5dae72462ec2867217b0adc4 to your computer and use it in GitHub Desktop.
<?php
/*
INSTRUCTIONS FOR THIS CODE:
On your RSS URL add &allow_feed=true to the end of it.
Then copy the below code and paste it into a plugin like My Custom Functions or Code Snippets on your site.
This will allow other plugins/sites to view the feed without the content blocks.
*/
function allow_feed_through($block, $post, $uri) {
if(isset($_GET['allow_feed'])) {
$block = false;
}
return $block;
}
add_filter('mepr-pre-run-rule-content', 'allow_feed_through', 11, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment