the_content filter but not in an RSS feed
-
I’ve got a homemade plugin which replaces
<!--phrase-->
with
Here is some clever stuff
<?php /* Plugin Name: Clever Stuff Plugin URI: https://blog.artesea.org Description: Just an example Author: Ryan Cullen Version: 0.1 Author URI: https://blog.artesea.co.uk/ */ function clever_stuff($content) { global $wp_query; if(!preg_match("|<!--phrase-->|", $content)) return $content; else { $text = 'Here is some clever stuff'; return preg_replace("|<!--phrase-->|", $text, $content); } } add_filter('the_content', 'clever_stuff'); ?>
however I don’t want either too appear in the RSS feed.
Which filters should I be using to stop it from happening, I’ve attempted to use
remove_filter('the_content_rss', 'clever_stuff');
but “Here is some clever stuff” still appears in the RSS file.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘the_content filter but not in an RSS feed’ is closed to new replies.