A
A
Al Sm2016-03-29 22:53:36
JavaScript
Al Sm, 2016-03-29 22:53:36

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

3 answer(s)
A
Al Sm, 2016-03-30
@radio_mus

shortcoder plugin

V
Vladimir, 2016-03-29
Khatter @mrKhatter

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.

N
Ninja Mate, 2016-03-30
@victorzadorozhnyy

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 question

Ask a Question

731 491 924 answers to any question