Can I Put Javascript Code in Wordpress?

macfais

Active member
Registered
Joined
Nov 6, 2017
Messages
73
Points
8
Hello.

I just want to ask if Javascript Code can be put in Wordpress.

Thank you,
 

Gmeister4

Well-known member
Registered
Joined
Apr 19, 2016
Messages
178
Points
18
Yes of course, you can put an external javascript into your Worpdress site by adding it in header.php in your theme folder.
There is another way to add javascript code into your WP site by using functions.php but that is more complex than putting directly in header.php file.
 

Mujkanovic

Well-known member
Collaborate
Registered
Joined
Apr 24, 2016
Messages
424
Points
18
You can also add your Javascript codes with a plugin such as Insert Headers and Footers of WPBeginner. It will work but for this case, I would not suggest using a plugin because it can consume your resource than using normal codes to add to your Wordpress files.
 
Newer Threads
Replies
1
Views
2,029
Replies
2
Views
2,323
Replies
1
Views
1,110
Recommended Threads
Replies
2
Views
1,498
Replies
6
Views
3,161
Replies
0
Views
2,002
Replies
4
Views
4,526
Similar Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top