Ver Mensaje Individual
  #5 (permalink)  
Antiguo 11/04/2014, 13:35
Avatar de dvbeaumont
dvbeaumont
 
Fecha de Ingreso: marzo-2011
Ubicación: Caracas
Mensajes: 145
Antigüedad: 13 años, 1 mes
Puntos: 1
Respuesta: Cómo deshabilitar css y scripts de algunas páginas con function.php?

Hola!

Gracias por la instrucción he conseguido la solución:

Cuando abro la página web y abro la consola con f12 me registra esto:

Código HTML:
Ver original
  1. <link rel="stylesheet" id="all_around-css-css" href="http://dominio.com/wp-content/plugins/all-around_v1.4.2/css/frontend/content_slider_style.css?ver=3.8.2" type="text/css" media="all">

EL ID real del stylesheet es "all_around-css" pero el wordpress coloca una terminación "-css"

Entonces dentro de la página functions.php coloqué:

Código PHP:
Ver original
  1. add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );
  2. /**
  3.  * Remove WooCommerce Generator tag, styles, and scripts from the homepage.
  4.  * Tested and works with WooCommerce 2.0+
  5.  *
  6.  */
  7. function child_manage_woocommerce_styles() {
  8.     remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
  9. if ( is_front_page() || is_home() ) {
  10.         wp_dequeue_style( 'all_around-css' );
  11. }
__________________
Sé parte de nuestro mundo creativo.

http://bbcreativos.com