php - Where is the best spot to place extra files on a Wordpress install? -


i making changes existing website based on wordpress (some javascript add-ins , few php scripts ajax purposes).

is proper directory should place these files? started off putting them in folder in root directory called assets, decided maybe should go rest of wordpress template , javascripts files? or should keep them out of wp- directories, , keep them in assets folder?

i know trivial question, doing things right- having them in directories make sense.

you can keep javascript in folder in theme's directory, wp-content/themename/.

concerning ajax, it's implementation different in wordpress. must add data variable called action in ajax request , hook function in functions.php file. ajax url should wp-admin/admin-ajax.php available through admin_url( 'admin-ajax.php' ) in php.

read ajax in plugins examples.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -