[Resolved] Not a valid feed template – WordPress Error

So, I opened up my webmaster tools to find out that some pages were giving 404 error. The error was showing like this: “ERROR: sort is not a valid feed template.”. I banged head for an hour on this before I actually fixed the issue.

Wherever there was a keyword XML in my URL, it gave this error. For example, for the url, https://adityabajaj.com/how-to-include-xsl-in-xml/ showed the error: ERROR: how-to-include-xsl-in is not a valid feed template. Note that xml keyword is not mentioned in the error. So anything before XML is included in the error.

Another URL giving me problem was: https://adityabajaj.com/sort-xml-attribute-using-xslt/. For this as you can guess the error said: ERROR: sort is not a valid feed template.. So clearly anything before xml was in the error. I am still figuring out what caused this problem.

Solution for Not a valid feed template

Options like putting dataxml or xmlfile will also not work. The reason is that it has xml again. So, I finally settled the issue with updating the post URL to https://adityabajaj.com/include-xsl-in-x-ml/ (The thing that helps is “xml” keyword not in the URL.

For the other URL, it was fixed with: https://adityabajaj.com/sort-x-ml-attribute-using-xslt/

Don’t forget to

When you finally sort the error and fix it (especially if a URL change is involved, don’t forget to set a redirect to the correct URL from the old URL. Otherwise you might just loose the traffic. I use simple 301 redirects plugin it is very very simple and easy to use.

4 Comments on "[Resolved] Not a valid feed template – WordPress Error"

  1. I was getting the problem with xml in the url. Can you share the exact page url where you are getting this problem?

  2. Hi ! I started to have this problem after enabling Google XML Sitemap on WordPress. Can you explain a bit more on how to resolve this problem ? Thanks !

Leave a comment

Your email address will not be published.