I havee figured it out, thanks. In case anyone else is in the same situation:
I was trying to add some connection information, required by the posts 2 posts plugin to work efficiently.
I realise I had a basic misunderstanding of the way wordpress works – that it does a default wp_query behind the scenes and that doesn’t need to get stated explicitly. I have created my own to replace it, thanks to a very useful tutorial I found:
http://wp.smashingmagazine.com/2013/01/14/using-wp_query-wordpress/