Why would this code work locally but break online?
Your first issue is the fact that you’re using query_posts. That function isn’t meant for creating new queries to the database; instead, it’s used to modify the existing global query. Read up here and here for more information on what you can use instead. Second, there is just some strange code in your template that, … Read more