Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
Give this a read.
http://codex.wordpress.org/Using_Javascript
Unfortunately, an error occured i was unable to fix the error as a consequence i lost all my work.
And remember: make backups of your files before you edit them. 😉
Thanks Jan, I have read that before. The strange thing is that i typed in the exact code that was listed wp_enqueue_script( in theme functions and it did not work. Backups you mean copy and paste in notepad? I dont want this to happen again. Any advice would be most welcome.
Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
As you’ve know, when you are using add_action('wp_enqueue_scripts', 'my_scripts_method'); you need to (typically) add that your theme’s functions.php file.
If you are editing functions.php then make a copy of that file before you edit it. You can usually do that via your hosts file management tool or plain FTP.
By keeping a backup copy then if something goes wrong you can put it back the way it was before you edited it. It’s a good way to get out of a problem that you may have created.
For editing notepad does work, but you may like Notepad++ better. It formats your code as well as provided line numbers.
http://codex.wordpress.org/Editing_Files#Editing_Files_Offline