Query posts based on author id

Posted by user338109 on Stack Overflow See other posts from Stack Overflow or by user338109
Published on 2010-06-17T10:50:01Z Indexed on 2010/06/17 10:53 UTC
Read the original article Hit count: 270

Filed under:
|

I have the current author id stored in $theauthorid I want to do a query based on the author id so I do this

query_posts('author=$theauthorid');

However it does not work unless I write the id manually. I know the id is stored correctly as I get the correct id when I echo it.

© Stack Overflow or respective owner

Related posts about php

Related posts about Wordpress