Adds functions, shortcodes & quicktags to empower WordPress users to have better control of when content is served, based on device.
With all of the new web enabled devices springing up in the market and with the wide range of screen sizes and data transfer speeds, a website can no longer serve the same content upon every request (not without some degree of limitation and/or traffic-loss).
This lightweight plugin lets content writers and theme authors choose when WordPress should or shouldn’t show any give content item using shortcodes and quicktags or theme elements using functions. It uses Mobile Detect (a PHP script) to identify the website visitor’s device as either mobile, tablet or desktop, enabling you to allow or disallow content to be output. Use it to prevent large files such as images from outputting to devices that generally have a lower data transfer speed available to them (e.g. mobile devices). Serve more extensive copy and more elaborate userinterfaces to desktop devices and laptops. Target tablets to market a tablet oriented product or service. You can also detect iOS, iPhone, iPad, Android OS and Windows Mobile OS.
Example of a shortcode: [notmobile]Write anything you want between these two tags and WordPress will only output it when the visitor is viewing your website with a desktop/laptop or tablet and not with a mobile device.[/notmobile]
Easily add these shortcodes using the Quicktags in Text view.
All shortcodes also exist as functions (prefixed with aFAC_ for namespacing), which can be used in your theme as needed. See the FAQs for more detail. Each function is a boolean and simply returns true or false.
This section describes how to install the plugin and get it working.
e.g.
addfunc-adaptive-content
folder to the /wp-content/plugins/
directoryAll available shortcodes are documented in the Help tab under “Adaptive Content” (on the content editing page).
To use the Quicktags you must have your JavaScript enabled. Other than that, nope.
Yep.
Yes. That is what it’s base script (Mobile_Detect.php) is designed for and it does the job well.
Can I get a statistic? It really depends on how often you get visitors who have javascript turned off and whether you can do without them. Likewise, I suppose, it depends on whether many of your visitors withhold their browser and system data when requesting your website. Neither of these are very common, but they both happen.
Not likely. PHP generally runs very fast on web servers, and with JavaScript the you’re relying on the speed of your visitors system. Beside that, the point of this plugin is to serve the right content to the right devices, and only that. If you have to load a Javascript to detect the device before loading the rest of the page, that’s an additional script served and another query to your server would be necessary, when here we’re trying to minimize data transfer. Plus, waiting until your visitor’s machine has finish running a script before you can serve up the entire page isn’t as efficient as catching the device and OS specs when they first come to you automatically and thusly knowing what to serve up right from the start of the initial query.
Yes. That’s quite a trick and we would love to see someone develop a plugin which makes that easy. I haven’t found one yet.
Feb-2016
Sep-2015
Apr-2015