Viewing 6 replies - 1 through 6 (of 6 total)
  • Try this:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the Twenty Ten theme to rule out any theme-specific problems.

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    Thread Starter David Gard

    (@duck_boy)

    Hey Esmi,

    I have turned off all plugins and reset the plugins folder, and I have left the site with no plugins over night. Unortunatly this did not work. I’m a little reluctant to switch to the TwentyTen theme as this is my companies website, so it needs to be up.

    I have switched the offline version to TwentyTen, but knowing very little about RSS, I don’t even know if this would work offline.

    One thing that would be good to know – when I make changes, such as deactivating plugins, should the results be pretty much instant if this was the problem?

    Edit: For the offline site I have set up a different feed, just to clarify…

    Thanks.

    Thread Starter David Gard

    (@duck_boy)

    Ok, I’ve now set up a dev site with no plugis that uses the default theme and a carbon copy of the live DB (with URL and plugin options changed) and it I’m still getting ths same issue.

    One thing I have noticed is that even thought the URL for the feed is correct (https://www.dynedrewett.com/news-and-events/feed/), when I click the title on the feed it takes me to the home page (https://www.dynedrewett.com/), which has not posts on it so would not update…

    Maybe it’s meant to do that, I’m really not sure. Any more help is appriciated.

    Thanks.

    Thread Starter David Gard

    (@duck_boy)

    Ok, so I am getting some where – I now seem to be able to show an RSS for categories (https://www.dynedrewett.com/firm-news-types/firm-news-cat/feed/), although it will still not work for the index page as above (https://www.dynedrewett.com/news-and-events/feed/) and if I try it for any of the custom post types (such as Careers, which doesn’t have any categories that I can use) I am taken to the 404 page.

    I’m hoping that this has now become about me missing something rather than a problem.

    Thanks.

    Thread Starter David Gard

    (@duck_boy)

    I eventually found references to the code below after twawling through the forums and the web, and this seems to have done the trick (add to functions.php). This is apparently caused by a lack of support for custom post types in feeds (hopefully something that will be worked on in the future).

    function feed_request($qv){
    	if(isset($qv['feed']) && !isset($qv['post_type']))
    		$qv['post_type'] = array('news', 'tla');
    	return $qv;
    }
    add_filter('request', 'feed_request');

    Now, viewing the feed should be as simple as typing ‘https://yourdomain.com/feed – in the example above you will see only posts of type ‘news’ and ‘tla’. If you want a secondary feed, for your job vaciencies for example, you could override the code above like this – ‘https://yourdomain.com/feed/?post_type=career’

    Or, if you simply want to add every post type that you have to the main feed.

    function feed_request($qv){
    	if(isset($qv['feed']))
    		$qv['post_type'] = array();
    		$qv['post_type'] = array('public' => true, '_builtin' => false);
    	return $qv;
    }
    add_filter('request', 'feed_request');

    Any way, this caused me some hassle, so I hope this post is of use to people in the future.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘RSS Feed not displaying stories’ is closed to new replies.