WordPress.org

Ready to get started?Download WordPress

Forums

the_content filter is no working (4 posts)

  1. partyzant
    Member
    Posted 2 years ago #

    I have a plugin which changes content of post, its code is:

    function test_display($azx) {
        echo 'chuj';
        return '<u>'.$azx.'</u>';
    }
    
    add_filter('the_content', 'test_display');

    and on one post category it is working ok (print 'chuj' and dispay underlined content) and on other post category it only print 'chuj' and not changes contentent. Someone can tell me why the hell that is?

  2. vtxyzzy
    Member
    Posted 2 years ago #

    Can you post a link to a page where the problem can be seen?

  3. partyzant
    Member
    Posted 2 years ago #

    Can you post a link to a page where the problem can be seen?

    No, this is test page on localhost. I've also find out that when I echo $azx variable inside test_display function it prints post content twice.

  4. partyzant
    Member
    Posted 2 years ago #

    After some debuging i've found the cause of this problem, it was feedwordpress plugin which has add_filter('the_content', 'feedwordpress_restore_syndicated_content', 1000)

Topic Closed

This topic has been closed to new replies.

About this Topic