Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //enqueue and localizing the Javascript.
- function assets() {
- wp_enqueue_script('ajax_filter_post_mdu', get_template_directory_uri() . '/js/ajax-filter-posts.js', ['jquery'], null, true);
- wp_localize_script( 'ajax_filter_post_mdu', 'bobz', array(
- 'nonce' => wp_create_nonce( 'bobz' ),
- 'ajax_url' => admin_url( 'admin-ajax.php' )
- ));
- }
- add_action('wp_enqueue_scripts', 'assets', 100);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement