Ttt Devices Wordpress Plugin is used by 13 websites. Among 13, 0 site is within top 10,000 and 0 site is within top 100,000 websites.

Wordpress Plugin Information of

Plugin Meta Name Plugin Meta Information
Plugin Name
Plugin Description Custom device performance. Make your Responsive Design better. Beyond CSS @media Queries.
Detail Plugin Description

Simple way to detect the client device at php level.

Identify the device with a CSS body class

  • For a desktop in linux
<html>
<body class="linux chrome desktop">
</body>
</html>
  • For a desktop in Mac
<html>
<body class="mac firefox desktop">
</body>
</html>
  • For a iphone mobile
<html>
<body class="mac safari mobile">
</body>
</html>
  • For a android mobile
<html>
<body class="chrome linux mobile">
</body>
</html>

And also some for IE ;)

How to indentify the device

<?php
if ( is_tttdevice('desktop') ) {
    echo "this is a desktop device";
}
elseif ( is_tttdevice('mobile') ) {
    echo "this is a mobile device";
}
elseif ( is_tttdevice('tablet') ) {
    echo "this is a tablet device";
}
else {
    echo "Opps...  we don't know what this device is!!";
}
?>

How to remove the sidebar for mobile only

<?php
if ( ! is_tttdevice('mobile') ) {
    get_sidebar();
}
?>

This means, the sidebar will not -print- for mobile divices. This is not the same has "hidden" in CSS.

Other keyword to dettect devices

<?php
if ( is_tttdevice('iphone') ) {
    echo "this is an iPhone";
}
if ( is_tttdevice('android') ) {
    echo "this is an android";
}
if ( is_tttdevice('windowsphone') ) {
    echo "this is an windows phone";
}
if ( is_tttdevice('mobile') ) {
    echo "this is a mobile";
}
?>

Stop loading some js for mobile

Is very usefull if you need to make your site faster for mobile or tablet, this browsers can handle well some javascripts effects. You can stop remove them from a device like this. Example:

In your functions.php file:

function heavyanimation_script() {
    if ( is_tttdevice('desktop') ) { 
        wp_enqueue_script( 'heavyanimation', get_template_directory_uri() . '/js/havyscript.js', array('jquery'));
    }
}   
add_action('wp_enqueue_scripts', 'heavyanimation_script');

This means that js only load in desktop devices, easy :)

More Information Wordpress Official Plugin Repository
Google

Top 13 Websites built with Wordpress plugin

435,167 favicon of PLASQ.COM PLASQ.COM
plasq.com | Home of Comic Life
Geometry Dash
Restaurante Manolete Tapeo Relajao | Restaurante de Barcelona de comida mediterránea, tapeo y platos para compartir.
30,000,000 favicon of AD-MAGAZIN.DE AD-MAGAZIN.DE
ARCHITECTURAL DIGEST - DAS BESTE AUS INTERIOR, STIL, DESIGN, KUNST & ARCHITEKTUR
30,000,000 favicon of DODOBOOKING.COM DODOBOOKING.COM
Cheap flight booking and online hotel deals - Dodobooking
30,000,000 favicon of CALLWEY.DE CALLWEY.DE
Callwey Verlag: Architektur, Garten, Bauen, Wohnen, Kochen, Backen
30,000,000 favicon of BAUMEISTER.DE BAUMEISTER.DE
Baumeister - Das Architektur-Magazin
30,000,000 favicon of COSETTE.ES COSETTE.ES
Cosette - Moda y más
30,000,000 favicon of MICNT.COM.EC MICNT.COM.EC
Home - Corporación Nacional de Telecomunicaciones
Redes de mercadeo marketing negocio multinivel venta directa
30,000,000 favicon of LOGITERS.COM LOGITERS.COM
Logiters | liderazgo logístico en iberia
Descargar Geometry Dash gratis
Libros recomendados. Tu blog sobre literatura y escritores