Moved infinite-scroll support code to the functions.php file.