Answer the question
In order to leave comments, you need to log in
How to embed javascript code in wordpress page?
Hello!
Can you please tell me how to insert javascript code into a page in wordpress (you need it in the page, not in the header or footer)?
For example, to use php scripts on pages (in widgets or elsewhere), there is a wonderful php-exec plugin.
Answer the question
In order to leave comments, you need to log in
Create your script.js and control via classes or id DOM - structure. Connect your script to the footer! And there will be happiness!;)
PS: If you do not want to understand the structure of the CCM.
do a check and connect if (is_page('346') )
you can do it like this
<?php
if (is_page( 'Page Slug or Title' ) ):
# и сюда свой код
endif;
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question