Infinite scroll page number [duplicate]

Here’s the original answer. To sum it up briefly: Build a custom plugin Register a custom script Localize this script to add the data from $GLOBALS[‘wp_query’] – numberposts, posts_per_page and found_posts in it. Write a custom event handler that triggers when the infinite scroll function runs. Here’s a link to the original script in the … Read more

adding the full image path to a wordpress javascript file

well first of all, don’t directly inject a script tag like that, use wp_enqueue_script to add your javascript file. additional data can then be passed from php to javascript via the wp_localize_script function. function wpa_scripts() { wp_enqueue_script( ‘wpa_script’, get_template_directory_uri() . ‘/js/script.js’, array(‘jquery’), null, true ); $script_data = array( ‘image_path’ => get_template_directory_uri() . ‘/images/’ ); wp_localize_script( … Read more

Rollover Image jQuery help

you should put that in the functions.js file (create it if it does not exist), and make sure it is embedded in your wordpress site with wp_enqueue_script in your functions.php file in your theme.