Archived topic
Enter Jquery Code in my Gp theme
1 reply · Started by Christine on December 13, 2019
Viewing posts 1–2 of 2
Hi,
Where i can enter the Javascript code in my website?
The code I want to enter is
$("form").keypress(function(e) {
//Enter key
if (e.which == 13) {
return false;
}
});
Let me know where to add the code.
Hi there,
you can use a Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/
Select the WP_footer hook and wrap your code in script tags:
<script type="text/javascript">
//jQuery code here
</script>
This archived topic is closed to new replies.