Since Facebook released Instant Articles more and more websites began using this new format as it promises more eyeballs thus monetization opportunities. For our project ligalive we had to go through a lot of trouble to make them work with WordPress as we are using a lot of custom post features. Following these steps you will have less headache publishing instant articles successfully.
Instant Articles currently work within the facebook apps on iOS/Android and get displayed when clicking on an external article link. The approval process by facebook takes several business days and it is very important to be as precise and bug-free as possible. Should you be rejected there is no need to worry though as you can re-apply multiple times. We had been rejected twice: firstly due to a post feed that also contained articles with not enough content and too many unhandled shortcodes, and secondly, due to a misplaced logo hiding part of the like button. Doh!
We recommend using the FB Instant Articles Plugin by the WordPress Team. Not only is it cleanly written but you can also expect stable updates and an active developer community. Furthermore it features a lot of hooks and settings you can use to adapt your feed.
Filtering Posts For In-/Exclusion
Generally it doesn’t make sense to publish every post as Instant Article that is why we recommend using a filtered version of the feed, for example only posts from category with ID 1 and 2:
Transformer Rules Save Your Day
It is absolutely essential to use transformer rules (Facebook SDK Docs) or else “unknown” elements in your article will get removed. Luckily you can use the plugin’s setting screen to define them.
Content from Custom Fields
WordPress’ Custom fields usually don’t show up in instant articles so if you rely a lot on them, most of your content will not get displayed. Using the instant_articles_after_transform_post function enables those fields again, even though you can only display them at the end of the article. That said, better than nothing.
Shortcodes – How To Remove Junk
Expect the biggest mess to happen around shortcodes if you are using a lot of plugins and functions provided by your theme. You can either filter them out using the instant_articles_before_transform_post function, or even better, transform them using interactive iframe elements.
Plugins – Mitigate The Mess
A couple of plugins write unwanted code into your instant article and make it break. We have developed this function in order to remove those bits.
Marketing with the Audience Network
Advertising from the Facebook Audience Network can automatically be placed within your content through the WordPress Plugin. Before setting it up though you have to follow these steps:
- Wait for the Instant Articles Approval by Facebook
- Apply for the Facebook Audience Network
- Create a Placement (note the Placement ID)
- Insert the Placement ID in your WordPress Settings
Google Analytics & IVW
Google Analytics can be integrated directly with the plugin. IVW (the German Association for recording and auditing the circulation figures of online media) is a different story. We have created a custom solution with iframe and subdomain while appending an analytics element via the instant_articles_after_transform_post function:
$ivw_analytics = Analytics::create(); $ivw_analytics->withSource($ivw_src); $instant_article->addChild($ivw_analytics);
Questions? Need Help?
Do you have any questions or need somebody to help you start publishing instant articles with WordPress? Let us know in the comments or send us an e-mail.
Latest posts by Nader (see all)
- Merry X-Mas & Happy New Year! - December 24, 2016
- Our Team Offsite in Barcelona - November 6, 2016
- ringrocker Relaunches With Community-Powered Fanzine - July 23, 2016