I’m having a similar problem – my code outputs the current page title.
When I add global $post;
before my loop, it then just outputs the chronologically first post on my site.
The code is running within a template.
Any help would be greatly appreciated.