Hi!!
This is the code:
function register_script() {
global $wp_query;
wp_enqueue_script( ‘ajax_js’, get_stylesheet_directory_uri() . ‘/js/ajax.js’, array( ‘jquery’ ), ‘1.0’, true);
wp_localize_script( ‘ajax_js’, ‘ajaxpagination’, array(
‘ajaxurl’ => admin_url( ‘admin-ajax.php’ ),
‘query_vars’ => json_encode( $wp_query->query )
));
}
Hi!
That line of code gives an error but I don’t know why, if I leave it commented, is there a problem?
Maite
Hi!!
The problem is this code in function.php:
add_action(‘init’, ‘register_script’);
Thank you!!
I have updated and everything is OK!
But I have the same problem that I had, if I go to the media library the images are not displayed with the child theme activated, if I activate the other theme if I see the images.
Thanks,
Maite