I am using simply
at the top of the content in editor.
Also I want these code to be added at right place as we do with hooks. Means just above body tag.
And when I am adding this code it is coming in
<p> tag which increasing space on my front end page.
I don’t know how to do this but this is very critical for me.Please help.
The reason your script works in your post is because you have the capability as an administrator to insert
unfiltered_html in your content. Now if you call the functions of your script after you have inserted it or when the DOM is ready, then it’ll work. But for CSS, it needs to be rendered in your
Now this mainly is theme dependent, but some theme developers offer the possibility to add css/javacsript in the header/footer of their themes either in their themes settings page or through meta boxes on posts/pages.
That is because they have placed some hooks there so when you add code in their settings page, that code will be called by those hooks.
So, it’s not really possible to achieve this if the theme developers haven’t incorporated in their designs the necessary hooks for you to customize your styles or scripts. You will need to edit your
functions.php files in order to achieve that.