How To Remove JotForm Branding (With Using Code)
1. Include the latest jQuery file in your functions.php file:
Script Code (Open functions.php file and include this script):
function jquery_cdn_script() {
wp_enqueue_script( 'jquery-script', 'https://code.jquery.com/jquery-3.6.0.min.js', array(), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'jquery_cdn_script' );
2. Now after inserting the above code. Open the footer.php file and copy paste the below code just before the wp_footer() function. The reason why we are inserting after the wp_footer() function because it loads all of the JS scripts in to your theme. So make sure jQuery cdn file get loads first and then it will run our below JS Script.
Code:
<script>
var $ = jQuery.noConflict();
jQuery(document).ready(function(jQuery) {
"use strict";
$('iframe').contents().find("head").append($("<style type='text/css'> div.formFooter{ display:none !important; } .jf-branding{ display: none !important; } div.form-footer{ display: none !important; } </style>"));
});
</script>
Explanation:
Now what it will do. It will look for an 'iframe tag' and then it will find the 'head' section inside an 'iframe' tag and after that inside the 'head' section of an 'iframe' it will add our internal styles for which is use to 'display none' the Jotform Branding area.
Full Tutorial:
Comments
Post a Comment