Snippets not working | WordPress.org

[ad_1]

Hi, I just started with Snippets and wrote this in a php:

echo ‘<script type=”text/javascript”>’;
echo ‘alert(“JS alert box in PHP”)’;
echo ‘<script>’;

This should get the alert box to appear in any creation or opening of a post or page, should it not? – However nothing happens.

What am I doing wrong?

Thanks

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer