0

By default, all post's content is included into rss (content:encoded element). I would like to convert reader to visit website.

Currently, description element is truncated, but content:encoded contains full post. Eg:

    <description><![CDATA[<a href="https://wolnyfinansowo.pl/robocash-recenzja-2022/" title="Robocash Recenzja (2022)" rel="nofollow"><img width="150" height="150" src="https://wolnyfinansowo.pl/wp-content/uploads/2022/10/Pasted-1-150x150.png" class="webfeedsFeaturedVisual wp-post-image" alt="Robocash recenzja" style="display: block; margin-bottom: 5px; clear:both;max-width: 100%;" link_thumbnail="1" /></a><p>Po przeszło roku inwest...</p><p>The post <a rel="nofollow" href="https://wolnyfinansowo.pl/robocash-recenzja-2022/">Robocash Recenzja (2022): 12,74% zysku</a> appeared first on <a rel="nofollow" href="https://wolnyfinansowo.pl">Wolny Finansowo</a>.</p>]]></description>
    <content:encoded><![CDATA[<a ... {full post's content}</content:encoded>

How to trim or even remove content:encoded element?

1 Answer 1

0

You may achieve this by adding a code snippet to truncate get_the_content_feed via filter:

function truncateFeedContent( $content )
{
    $content = get_the_excerpt();

    return $content;
}
add_filter( 'the_content_feed', 'truncateFeedContent' );

By default, get_the_content_feed show all content

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.