Question
I am implementing some changes to my website's page with AJAX. I have enqueued my js file in functions.php add_action( 'wp_enqueue_scripts', 'add_my_script' ); function add_my_script() { wp_register_script( "index", get_stylesheet_directory_uri() . '/index.js', array('jquery') ); wp_localize_script( ...
0
, 3 days 0 Answers 6 views

Question
I intended to load a script within a child's theme because I wanted to experiment with a feature. Initially, I loaded the script as follows: // loading menu toggle function function menu_toggle_enqueue_script() { wp_enqueue_script( 'menu-toggle', get_template_directory_uri().'/assets/js/menu.js'); } add_action('wp_enqueue_scripts', 'menu_toggle_enqueue_script'); Unfortunately, that returned an ...
0
, 2 weeks 0 Answers 22 views