How to customise WordPress RSS Feed for Flipboard
Well, if you ended up here, it most likely means two things. One, is that you are trying to make your WordPress RSS work on Flipboard. Two, is that you have visited dozens of forums and websites related to web development and still haven’t found a solution.
Here I predominantly share my Muay Thai venture and stuff related to combat sports. However, being involved in web development for quite some time, I believe I can write a few lines on this topic too.
I presume you have faced a similar situation to the following. Created an account. Created a magazine. Submitted your WordPress RSS Feed. These were some of the steps towards becoming a Publisher, right?
After submitting your RSS as a source of a magazine, the first status you saw was pending. Then it was processing. And finally… Approved? Or declined due to your WordPress RSS not meeting the required criteria as outlined on Flipboard RSS Guidelines?
Indeed, the original WordPress RSS feed is quite simple. It doesn’t really contain much. Well, it contains enough, but not enough for this particular matter.
I have contacted the Flipboard support to understand what was wrong. To mention, the customer service agent has been truly helpful, and most of all patient in dealing with a Muay Thai fighter who occasionally presses the buttons on a keyboard. Thank you to her.
The received response stated the following:
“Your feed does not contain images. The images need to be included in the enclosure node for each item in the feed.”
And the drama begins
A few (annoying) hours (days) were spent on trying to figure out how to make it work. I’ve visited a (large) number of websites, including Russian, where it is suggested to use a plugin. But we want to make it work without a plugin, right?
Then there were quite a few suggestions to put this or that code in the functions.php file. Still not working.
Sounds familiar right?
Add length and type to Wordpress RSS image enclosure
I’ve found this function posted by the user “DaveyJake” on Github. Thank you to him.
The function was added to our functions.php file. Finally, WordPress RSS contains image as an enclosure URL. But… The Length was not being featured in the outcome, which is required, along with the Type.
Not saying the function is “wrong”. But something appeared in need to be edited.
Then I’ve found one of the questions published by the user “Lee King” on Stack Overflow, titled as “How to add length and type to RSS featured image enclosure tag (WordPress)”. In fact he most likely was trying to figure out exactly the same thing.
The actual function he presented is not the one I used. But what I used was a response to him posted by the user “staypuftman”. Thank you to both of them.
The suggestion stated: “Do print_r($featured_image) and see what fields are in that array. You’ll probably find length and mime_type in there.”
This indeed provided the “id” of the length which was added into the edited function presented by “DaveyJake”. And it worked.
This code here (txt file) I added to functions.php. The outcome saw WordPress RSS including what was needed: featured image enclosure URL with length and type.
I am not a guru when it comes to coding. I understand CSS, PHP, MySQL and all this stuff, of course. I can edit it, but I wouldn’t be coding something from zero myself and present it to others as a solution.
Always back up your database and everything else prior making any modification.
If you use the code – you use it at your own risk.
In conclusion, it can hopefully however help you achieve your goal and become a publisher on Flipboard. If it does, you can also always follow our profile and magazines, if you like combat sports.
And one more time, the actual code is not created by me, I have only edited it. So, if it works out for you, thank those who have written it.