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 have an author.php page that displays two kind of posts:

  1. first section displays latest 10 posts(games) from all categories, except one.
  2. second section displays latest 10 posts only from that category that are excepted at the first section.

With two kinds of posts, I put one red button link under each section, to see all posts by the same author. Each button link should link to the right page: the first button link that should link to a page with the posts belonging to the first section, and the last button link that should link to a another page with the posts belonging to the second section.

On that pages I think it's easy to display post by categories, my problem is that I really don't know how to create these pages and how to link to them.

Any help or suggestions will be greatly appreciated.

share|improve this question
    
You have described four different elements - lists of posts by category, link to category archive, list by author, link to author archive. I am little fuzzy which of this (and/or archives) precisely you need help with? –  Rarst Jun 11 '13 at 20:19
    
If you read the title I think that is enough: How to display posts by author in a separate page, other than author.php? Thanks anyway. –  Knott Jun 11 '13 at 21:00
    
Please don't scoff at requests for clarification. Not everyone is native English speaker and not everyone (on both sides of it) has perfect command of WordPress terminology. It's in your best interested that question is refined to be easy to provide precise and fitting answer for. –  Rarst Jun 11 '13 at 21:08
    
@Rarst, I'm not scoff at anyone, I will never do that. I respect every answer and comment in part, be they even useless, as long as someone has taken from his spare time to answer me. I just thought the title says everything you need to better clarify what I want to do. –  Knott Jun 11 '13 at 22:18

1 Answer 1

Retrieving set of posts by some criteria is typically realm of secondary loop.

You can use get_posts() template tag or WP_Query object which both support author parameters in arguments:

  • author (numerical ID)
  • author_name.
share|improve this answer
    
That makes sense to me. I'll try put all together and I hope the pagination will work also. Any suggestion about how to link that pages from author.php? Thanks. –  Knott Jun 11 '13 at 22:25
    
@LiviuCostache how do you imagine to implement pagination with multiple loops on page? In general pagination only works easily with main loop (the one WP performs internally before template load), otherwise it is challenging to implement. –  Rarst Jun 12 '13 at 9:21
    
Initially I thought you were having a bad day and I overlooked but now I tend to think so is you. You actually do not answer to questions, it seems like you rebuked those who ask you inappropriate questions, instead of calmly explain. From where comes this nerve up to treat people like this? Because the role of moderator you talk in this manner? –  Knott Jun 16 '13 at 13:02
    
@LiviuCostache please understand that while you might consider your question clear it might not be to other people. That's why I asked for clarification initially (which you declined to try) and about pagination later (which your question makes no mention of). If you have issue with my behavior as mod please post on meta.wordpress.stackexchange.com or contact administrators directly wordpress.stackexchange.com/contact , I would be happy to have situation reviewed. –  Rarst Jun 16 '13 at 13:34
1  
Well, that escalated quickly... –  anu Jun 21 '13 at 11:28

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.