• Resolved anuragd7

    (@anuragd7)


    Hi
    I would like to remove the title and the link to each blog post that comes at the end of the excerpt for each post in the default RSS feed.

    Please advise on how this can be achieved.

    • This topic was modified 2 years, 8 months ago by Yui. Reason: moved to fixing wordpress

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • That’s not in the RSS feed generated by WordPress.

    That’s something most likely added by the Yoast SEO plugin you’re using.

    Go to Yoast > Search Appearance > RSS and remove everything from the “Content to put after each post in the feed” box.

    Thread Starter anuragd7

    (@anuragd7)

    Hi
    Thanks for responding. I have tried your suggestion and it does not remove the bits I want to delete.
    Also, I removed all plugins and checked. This feed is still generated even when I don’t have any plugin installed.

    Thanks

    This feed is still generated even when I don’t have any plugin installed.

    Your question was never about disabling feed generation. It was about “title and the link to each blog post that comes at the end of the excerpt for each post in the default RSS feed.”

    Please confirm if your goal is to disable feed generation.

    If that’s not your goal and we’re still talking about your original post, please provide a screenshot of your RSS feed in an RSS editor, showing the “title and link” that you’re referring to.

    Standing by.

    Thread Starter anuragd7

    (@anuragd7)

    Hi
    I would like to modify the RSS feed generated so that the title and the link to each blog post that comes at the end of the excerpt for each post are removed.

    The highlighted portion in the image is what I want to remove from the RSS feed.

    Hope this clarifies.

    Thanks

    For what it’s worth, I put your RSS feed in the Feedly RSS reader to test this. There’s only a single item in the RSS feed titled “Neque porro quisquam est qui dolorem ipsum”, and I did not see any “title and link” at the BOTTOM of the feed content.

    (Note: the “Visit Website” button is a Feedly feature, and not part of the feed’s content.)

    Thread Starter anuragd7

    (@anuragd7)

    Hi
    What you have shown is the entire feed for the post. In the RSS feed there is also an excerpt portion as shown in the image shares. The bits I am talking about (post title and read more link) are attached to the excerpt portion of the feed and not to the complete post.
    Thanks

    The screenshot below is what I see in Feedly, with my test site’s RSS feed set to show excerpts. If I enter a custom post excerpt, there’s no ellipsis at all.

    I’m not using Elementor (or any plugin) though, and I’m using 6.0’s default theme (Twenty Twenty-Two).

    I’m testing with the Astra theme you’re using, and will let you know what I find.

    Thread Starter anuragd7

    (@anuragd7)

    Hi
    Request you to share the excerpt portion of the raw RSS feed (the equivalent of anuragwrites.com/feed). In case the excerpt portion in that does not have the post title and read more link, then I can safely conclude this might have something to do with elementor ( I am also not using plugins)

    Thanks for your help.

    Thread Starter anuragd7

    (@anuragd7)

    Using the structure provided in this link I finally solved this by adding the following code to functions.php

    add_filter('the_excerpt_rss', 'remove_sc_rss_feed');
    
    function remove_sc_rss_feed( $content )
    {
        global $post;
    
        // Remove div with class using regex
        $content = preg_replace('#<p class="read-more">(.*?)</p>#', '', $post->post_excerpt);
    
        return $content;
    }
    Thread Starter anuragd7

    (@anuragd7)

    Solved with above

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Remove post title and link from default RSS feed’ is closed to new replies.