Full text articles in the rss feed (i.e. without the more tag)

I can’t seem to remove the “Continue reading…” link in my rss feed. The feed is located here: http://gforge.se/category/r/feed/ I use the <!–more–> tag manually and I’ve checked that the Settings->Reading->For each article in a feed, show: Full text but I guess this is only for the automated WP summary function.

My issue seems to be closely related to this previous post, but I’ve tried the Full Text Feed plugin to no aid. According to the plugins homepage it’s no longer needed… I’m not entirely sure which file Ramkumar suggests the changes for.

Read More

I’ve tried editing the Full Text Feed plugin but it seems not to activate properly for my category feed, when I add a:

$content = "test";

it only shows when I’m in the general feed, gforge.se/feed/ but not in the R category where I want it. I’ve tried to find some other filter hook but after a quick RSS search haven’t really found one that seems to do the job: https://codex.wordpress.org/Plugin_API/Filter_Reference – with the the_category_rss seeming to be the closes one to my need.

Related posts

Leave a Reply

1 comment

  1. Ok, so it turns out that I needed to use the the_excerpt_rss filter and to modify the code so that it only applies to the R category I just added a is_category("R"). Below you can find the altered Full Text Feed plugin:

    function ff_restore_text ($content) {
        if ( is_feed() & is_category("R")) {        
            global $post, $page, $pages;
    
            if ( !empty($post->post_password) ) { // if there's a password
                if ( stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password ) {  // and it doesn't match the cookie
                    $content = get_the_password_form();
                    return $content;
                }
            }
    
            if ( $page > count($pages) )
                $page = count($pages);
    
            $content = preg_replace('/<!--more(.*?)?-->/', '', $pages[$page-1]);
        }
    
        return $content;
    }
    
    add_filter('the_excerpt_rss', 'ff_restore_text');