removed anonymous function from spl_autoload_register and set WP_Query to return all posts and pages