Javascript snippet not executing
-
Hi,
I’ve successfully used the snippet plugin to add text snippets to my site, but when I try to add a javascript snippet, it just shows the shortcode [snippetname] on my site.
I created a new snippet with the name “reward” and the following content:
add_action( 'wp_head', function () { ?> <script> const euro = 3.03; document.write(euro); </script> <?php } );
and tried including it on the page by simply writing
[reward]
. It’s probably a newbie mistake, but I couldn’t find a solution on this forum.The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Javascript snippet not executing’ is closed to new replies.