Filters don't work on syndicated content (4 posts)

  1. Trahald
    Posted 8 years ago #

    I'm having trouble applying filters to syndicated content (using FeedWordPress).

    The following test plugin works for content I manually post, but not for syndicated content:

    Plugin Name: A Test plugin
    Description: A test plugin
    function test_function($content='')
    return "TESTING".$content;
    add_filter('the_content', 'test_function');

    What is different about syndicated posts that this doesn't work for them? I tried messing around with the wp_posts table post_author, excerpt, and guid fields to see if making those like my own posts would fix it, but that didn't seem to work.

  2. Trahald
    Posted 8 years ago #

    Anyone have any insights on this?

  3. fabiobxl
    Posted 8 years ago #

    comment out the line:

    add_filter('the_content', 'feedwordpress_restore_syndicated_content', 10000);

    in wp-content/plugins/feedwordpress.php

    I believe (not completely sure, I just installed it) FeedWordPress prevents the filtering of syndicated content by restoring a previously saved copy of the post.

    Be aware that by doing this you'll enable any content filtering on syndicated posts

  4. Trahald
    Posted 8 years ago #

    Thanks a lot, that's exactly what the problem was. Much appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic