How to automatically switch WordPress theme from a Facebook iFrame App

Facebook recently announced major updates to Facebook Pages to help Page admins easily manage communications, express their brands, and increase engagement. As part of these changes, you can now build your Page Tab apps using iframes rather than FBML. This means you can now build apps that run across Facebook using the same simple, standards-based web programming model (HTML, JavaScript, and CSS).

If your web site app is WordPress powered, and since Facebook limits iFrame width and height dimensions, It can be interesting to make WordPress responsive by forcing it to switch to an alternative theme when displayed from Facebook iFrame.

That’s where WP Theme Switcher+ comes to help.



This full five star plugin listed as one of “Eleven Fantastic WordPress Plugins from 2011” allows you to host and use multiple themes on your WordPress blog according to triggers such as category, tag, author… and lately a new version was released with a new “referer test” to check if the website was displayed from a Facebook iFrame app.



Easy as pie to pick up: just install WP Theme Switcher+ and create a new “Refere Test” with your Facebook app namespace as explained above.

Download WP Theme Switcher+