• Is there any posibility to disable all the javascript in the teme? I use K2 1.1 and in the head there are 2 scripts loaded (jquery 1.4.2 and k2 min).

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You can remove it manually from the theme (just edit it and remove ’em), but I don’t know if the theme will work without it.

    Why do you want it removed?

    Thread Starter Nasul

    (@nasul)

    I want to remove the javascript because why load something if is not usefull?
    And page load times will decrease.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Well. Logically k2min is being used by your theme K2 ??

    And jQuery is called by other WordPress functions. They shouldn’t affect your load time that much.

    Thread Starter Nasul

    (@nasul)

    I know, but I am a speed freak.

    This code placed in functions.php can be used to disable all the scripts.

    remove_action( 'wp_print_scripts', array('K2', 'enqueue_scripts') );

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    There is that. I suspect you’ll find out some features no longer work, though, so … good luck ??

    (If you’re that much a speed freak, look into WP Super Cache, W3 Total Cache, and Minify as ways to speed things up without removing functionality.)

    Thread Starter Nasul

    (@nasul)

    I used the remove action and all the features I need work. I use W3 Total Cache and it is good for minifind and other things but why keep jquery and other scripts in the head when I don’t need it?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    At that point, you may be better writing your own streamlined theme that omits all that stuff.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Disable all javascript’ is closed to new replies.