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; }
¿Te gustó este artículo? ¡Ni te imaginas lo que te estás perdiendo en YouTube!
Muy interesante y la verda un consejo útil para cualquier Blogger. 🙂
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
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 🙂
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?