So, I've been trying and trying to do this, and it's just p*ssing me off. I think my main problem is that I don't understand how to run the Loop at the same time as a foreach.
So, I'm working on a lab website (http://www.gjblues.co.uk/wsjlab) and in the 'Meet the Lab' section, I want each person to have an individual page. The template for this takes all sorts of info from the user profile and the avatar to produce the facts of the biography, and then the content actually written on the page makes up the rest.
That's the easy part. As you can see, it works pretty well: http://www.gjblues.co.uk/wsjlab/meet-the-lab/george-brooks/
However, I then want to make a summary page (the 'Meet the Lab' parent page) which has the same info parts grabbed from the profile (easy, as I just duplicate the code to make it in individual biographies) but then draws the_content from the child page for each person.
Here's the code I'm using to generate the 'Meet the Lab' page, which is exactly the same as the individuals, apart from in the child pages I use a snippet of code to correctly define $author as the post's $author, and the child pages also have the_content() in them.
All I want to do is call the_content from the child page for that author. The solution has to be dynamic - so I can't just specify the page ID, it needs to find it based on the the author and the fact it's getting it from one of its children.
Please help people, I know this is simple, but I just can't get it to play ball.