Answer the question
In order to leave comments, you need to log in
How to make wp functions work in your php file?
How to make wp functions work in your php file? It is located in my \wp-content\themes\landingpage\js\emailSend
Particularly interested in functionsget_option('blogname');
Answer the question
In order to leave comments, you need to log in
In order to use WP functions in a third-party script, you need to download the WordPress core .
To do this, you need to insert at the beginning of the file:
# Load WordPress Core
// Assuming we're in a subdir: "~/wp-content/themes/landingpage/js/emailSend"
require_once( '../../../../../wp-load.php' );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question