Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm sorry if this question is already been done, but I couldn't solve my problem after reading similar questions.

I would like to have customized author pages, in which each author can write text and insert images directly from the editor of wordpress.

Under the written page author, you should see the latest articles written by him (style blog).

I was able to create a template that works perfectly. The problem is that with this code I should create 20 different templates (one for each author) changing the id.

How can I tell wordpress to include the latest articles written by the author of each page?

Here's the code I used in my page template:

<?php query_posts('author=4'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
share|improve this question
    
what about using the author's archive template itself? It automatically does the same work, except you'll delete the query_posts line –  Mridul Aggarwal Nov 15 '12 at 18:16

1 Answer 1

As mentioned by @mridul-aggarwal WordPress supports author pages with the author.php template (Author_Template).

If you are setting up a custom template you will need some method of letting the template discover which user is supposed to be displayed, this is usually done via a POST/GET request or in the URI http://example.com/path/to/user/username which you can then detect using PHP.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.