• hello
    I am trying to do sth like this:

    if(is_page_template('current.php')){
             add_action('wp_print_styles', 'reset_css_current', 99999);
    }
    
    function reset_css_current(){
    	wp_dequeue_style('bootstrapwp', get_template_directory_uri().'/css/bootstrapwp.css');
    	wp_deregister_style('bootstrapwp', get_template_directory_uri().'/css/bootstrapwp.css');
    }

    But it the is_page_template() doesn’t work.
    Any ideas???

Viewing 1 replies (of 1 total)
  • Is the function used inside the Loop? If so, you will need to save the value to your own global variable before the loop and declare that same variable global in your function.

    If you are calling the function before the Loop, try adding global $wpdb; in the function.

Viewing 1 replies (of 1 total)
  • The topic ‘is_page_template inside functions.php’ is closed to new replies.