How to use force_feed with fetch_feed

Question

I use the exact same code from WordPress codex here : https://codex.wordpress.org/Function_Reference/fetch_feed#Example

It works as intended with most external RSS i tried to use but for one of them i have the error

A feed could not be found at RSS-URL. A feed with an invalid mime type may fall victim to this error, or SimplePie was unable to auto-discover it.. Use force_feed() if you are certain this URL is a real feed.

I can’t find any information on how to use force_feed with the code $rss = fetch_feed('RSS-URL');, and i’m 100% sure the external rss code is valid. I think the problem from the RSS is the content type which is xml and not rss+xml.

Any help appreciated, thanks !

0
Aurelien Grimpard 3 years 2020-04-07T12:51:54-05:00 0 Answers 79 views 0

Leave an answer

Browse
Browse