24sep
11

Me entero por Andrés de un truco muy chulo para mostrar la plantilla por defecto de WordPress a los visitantes que aún utilicen Internet Explorer 6, y que así vean bien nuestro contenido aunque se pierdan nuestras virtudes estéticas desplegadas en nuestra plantilla elegida.

Para conseguirlo solo tienes que añadir lo siguiente al fichero functions.php de tu theme (plantilla):

add_filter('template', 'serve_default_to_iesix');
add_filter('option_template', 'serve_default_to_iesix');
add_filter('option_stylesheet', 'serve_default_to_iesix');
function serve_default_to_iesix($theme) {
 if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false)
    $theme = 'default';
 return $theme;
}

Para saber más:

  • Pingback: Bitacoras.com

  • http://www.creativalibertad.com Joel López M.

    Muy interesante y la verda un consejo útil para cualquier Blogger. :)

  • http://acratas.mihost.info/Prometheo/ castguer

    Mira lo que me ha pasado al colocar el script en el functions.php y no se cvomo arreglarlo:

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-login.php on line 290

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-login.php on line 302

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 689

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 690

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 691

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 692

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 693

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 694

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 697

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 698

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 699

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 700

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 703

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 704

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 705

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 706

    Warning: Cannot modify header information – headers already sent by (output started at /home/ulpilex/public_html/Vitruvius/wp-content/themes/big-blue-01/functions.php:6) in /home/ulpilex/public_html/Vitruvius/wp-includes/pluggable.php on line 865

    • http://www.zonaelinternado.com Antow

      castguer yo te recomendaría que editases el archivo functions.php en tu ordenador, te lo bajas por FTP, y lo vuelves a subir borrando las líneas de código que han producido el error ;-) No sé si es el mejor procedimiento en estos casos pero a mí me ha servido en algunos casos :-)

  • Pingback: Como mostrar um theme Default para o nooso querido Internet Explorer 6 | Ajuda Wordpress em Português

  • Pingback: Como definir o tema Default para os usuários do Internet Explorer 6 | GF Soluções

  • Pingback: Mostrar el theme por defecto en Wordpress si los visitantes usan Internet Explorer 6 | Actualidad Informática

  • Pingback: Solución a la incompatibilidad de themes WP en IE 6 | Joel López M.

  • Pingback: Show default Wordpress theme if visitor uses Internet Explorer 6 | Open Blog

  • http://GratisJuegos2.in Edgar

    Español – ¿Como puedo mostrar un widget en la sidebar si el usuario usa Internet Explorer?
    Ingles – How I can show a sidebar widget if user use Internet explorer?

  • Pingback: Dicas Wordpress: Como definir o tema Default para os usuários do Internet Explorer 6 | GF Soluções