I am creating an author.php template
I would like to run a query based on the author_name but I don't want to hard code the author_name
how to I modify this so it grabs the variable from the query string?
query_posts('author_name=Harriet');
Thanks
I am creating an author.php template
I would like to run a query based on the author_name but I don't want to hard code the author_name
how to I modify this so it grabs the variable from the query string?
query_posts('author_name=Harriet');
Thanks
and of course sanitizes it .. I am sure that is built into wordpress
would like to run a query based on the author_name but I don't want to hard code the author_name
query_posts('author_name=Harriet');
how to I modify the query so it grabs the variable from the url?
http://mysite.com/wp/author/bob = query_posts('author_name=bob');
http://mysite.com/wp/author/sam = query_posts('author_name=sam');
this works
<?php query_posts('author=' . $curauth->ID . '&showposts=10'); ?>
This topic has been closed to new replies.