Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

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.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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');
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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