• Resolved Norvard Kim

    (@ca9ine)


    Hi Brice,

    I’m in love with the plugin, it’s by far the cleanest and best RSS plugin around.
    I would however love to be able to display the full HTML content of the feeds.
    Images and links contained in the feed are currently being filtered out, and I’m really interested in having them show up.

    Is there any way to do this?

    https://wporg.ibadboy.net/plugins/feedzy-rss-feeds/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi Kim,
    Thanks for message 🙂
    There a hook for that :

    function bweb_summary_input( $description, $content, $feedURL ) {
        //If you want to use the item content as the description. If not, then remove this line
        //If feed don't have content meta, $content is already equal to $description
        $description = $content;
    
        //List of feeds you don't want to remove HTML tags
        $feedList = array (
            'http://www.gumdust.com/feed',
            'http://b-website.com/feed'
            );
    
        //Remove the item HTML tags (as in the default hook) if not in the above list
        if( !in_array( $feedURL, $feedList ) ) {
            $description = trim( strip_tags( $description ) );
        }
    
        //Remove hellip (as in the default hook)
        //Keep in mind that it will be added later in the plugin render
        $description = trim( chop( $description, '[…]' ) );
    
        return $description;
    }
    remove_filter( 'feedzy_summary_input', 'feedzy_summary_input_filter', 9 );
    add_filter( 'feedzy_summary_input', 'bweb_summary_input', 10, 3 );

    Here is all the available hooks

    Cheers

    Thread Starter Norvard Kim

    (@ca9ine)

    Wow that was a really fast reply!

    Do I have to alter the plugin itself?
    I’m thinking of future updates.

    Absolutely not! NEVEEEEEEEEEEEEEERRRRRRRRRR 🙂
    You just have to past this function somewhere in your theme/child theme files (eg in functions.php).
    Don’t forget to edit the $feedList array with the URL of the feed you don’t want to strip tags.
    Cheers

    Thread Starter Norvard Kim

    (@ca9ine)

    lol, hence my question 🙂

    I did add it to my theme’s functions.php and also created a custom plugin using only that function -but nothing changed.

    I am using the widget, mind you.

    That’s strange…
    What’s your feed URL ?

    Thread Starter Norvard Kim

    (@ca9ine)

    Never mind…

    I’m not yet fully awake -I typed htttp…
    It’s all OK now! Now come the CSS tweaks to make this perfect!

    Thanks Brice, excellent support!

    Glad I could help 😉

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Display Full HTML’ is closed to new replies.