Skip to content

Instantly share code, notes, and snippets.

Max Kleucker mkleucker

Block or report user

Report or block mkleucker

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mkleucker
mkleucker / functions.php
Created Jan 26, 2012
Wordpress – Cleaning up the JavaScripts: - load jQuery at the end of the page - load own JavaScript - embed JS for Contact Form 7 only when needed.
View functions.php
<?php
/**
* Cleaning up the scripts
*/
function jc3_register_scripts() {
// Put jQuery to the bottom
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', false, '1.7.1', true );
wp_enqueue_script( 'jquery' );
wp_register_script( 'jc3' , get_template_directory_uri() . '/jc3.js', false, '1.0', true);
You can’t perform that action at this time.