Created
September 26, 2014 18:25
-
-
Save atwellpub/6df3bd698223ed3a0abb to your computer and use it in GitHub Desktop.
Remove all tracking classes on page 106
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action(‘wp_head’, ‘kill_form_tracking_for_specific_pages’); | |
if (!function_exists(‘kill_form_tracking_for_specific_pages’)) { | |
function kill_form_tracking_for_specific_pages(){ | |
// targeting page ID 106. Replace with your specific page ID | |
if (is_page(106)) { | |
echo ‘ | |
<script type=”text/javascript”> | |
jQuery(document).ready(function($) { | |
jQuery(“form”).each(function(){ | |
jQuery(this).removeClass(“wpl-track-me”); | |
}); | |
}); | |
</script>’; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment