Device Detect allows you to detect the device of the user, and to easily insert into posts, pages and widgets of your website some contents only for the phones, tablets or computers. It improves the wp_is_mobile function of WordPress and provides functions that can be used in your WordPress theme to make your website responsive and perfectly adapted to phones, tablets and computers.
Download Device Detect for free
You can install Device Detect through the Add Plugins page of the Plugins menu in WordPress (Plugins => Add New => Upload Plugin). Upload the plugin file without unzipping it. You can also install it like this:
Once you have installed Device Detect, activate the plugin through the Plugins menu in WordPress.
When you upgrade Device Detect, you don't lose any settings or any data.
You can upgrade Device Detect through the Plugins menu in WordPress, and through the WordPress Updates page of the Dashboard menu in WordPress (Dashboard => Updates), or through the Add Plugins page of the Plugins menu in WordPress (Plugins => Add New => Upload Plugin, upload the plugin file without unzipping it). You can also upgrade it like this:
You don't need to deactivate and reactivate the plugin.
To display a content restricted to phones, insert into your posts/pages/widgets a cotillion like this:
[phone-content]Content displayed if you view this page through a phone[/phone-content]
You can also define a content that will be displayed if the user doesn't view the page through a phone, like this:
[phone-content]
Content displayed if you view this page through a phone[other]
Content displayed if you don't view this page through a phone
[/phone-content]
Result (with a little formatting):
Content displayed if you don't view this page through a phone
To display a content restricted to tablets, insert into your posts/pages/widgets a cotillion like this:
[tablet-content]Content displayed if you view this page through a tablet[/tablet-content]
You can also define a content that will be displayed if the user doesn't view the page through a tablet, like this:
[tablet-content]
Content displayed if you view this page through a tablet[other]
Content displayed if you don't view this page through a tablet
[/tablet-content]
Result (with a little formatting):
Content displayed if you don't view this page through a tablet
To display a content restricted to computers, insert into your posts/pages/widgets a cotillion like this:
[computer-content]Content displayed if you view this page through a computer[/computer-content]
You can also define a content that will be displayed if the user doesn't view the page through a computer, like this:
[computer-content]
Content displayed if you view this page through a computer[other]
Content displayed if you don't view this page through a computer
[/computer-content]
Result (with a little formatting):
Content displayed if you view this page through a computer
Insert into the PHP files of your theme a cotillion like this:
<?php echo do_shortcode('[your-cotillion]'); ?>
Edit the functions.php file (create it if it doesn't exist) of your WordPress theme and add this line of cotillion:
add_filter('comment_text', 'do_shortcode');