Skip to content

Instantly share code, notes, and snippets.

@atwellpub
Created September 26, 2014 18:25
Show Gist options
  • Save atwellpub/6df3bd698223ed3a0abb to your computer and use it in GitHub Desktop.
Save atwellpub/6df3bd698223ed3a0abb to your computer and use it in GitHub Desktop.
Remove all tracking classes on page 106
<?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