I want to run a JavaScript and I want to paste in inside the <head></head>
tag
I do not want to add it to the text-view area.
How can I add this code snippet to an individual post (I mean not editing the headers.php)?
I want to run a JavaScript and I want to paste in inside the <head></head>
tag
I do not want to add it to the text-view area.
How can I add this code snippet to an individual post (I mean not editing the headers.php)?
You want to hook into the Header code using something like this:
add_action('wp_head','hook_javascript');
function hook_javascript() {
if (is_single('123')) {
$output="<script> enter your script here </script>";
echo $output;
}
}
More information available here: https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head