WordPress.org

Ready to get started?Download WordPress

Forums

Paginate Author's Post List on Custom Author Page (5 posts)

  1. venfrancis
    Member
    Posted 2 years ago #

    Greetings,

    I'm redesigning my blog and i have created a Custom Author Page(author.php). What i want to happen on my custom author page is to show the details of the specific author (description, email, and some custom fields), and finaly list it's posts and paginate it.

    Here's the screenshot of my custom author page:
    http://i56.tinypic.com/2cosldy.png

    As you can see, everything seems to be in order. Now, the problem is the pagination. I used the code by Kreisi (Pagination w/o using plugins). What i did is create a new custom loop and call it to Kreisi's function

    here's the code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Please shed some light as i'm pulling each hair on my head :(

    Thanks in advance!

  2. Curtiss Grymala
    Member
    Posted 2 years ago #

    Try changing numberposts to posts_per_page

  3. venfrancis
    Member
    Posted 2 years ago #

    Hi curtis, thanks for replying

    it's still the same :(

    Here's the scenario for further understanding

    Supposed the blog has a total of 30 blog posts, and the author Ven Francis has 15. If you can see on my variable, i did set the post_per_page value to 5. And on Kreisi's function it has the range of 2. (please visit the link to his code to further figure it out) So what it has to happen is that, pagination should show 5 page-buttons

    [c] [2] [3] [>] [>>]

    where [c] is the current... [3] and [>>] is the last page(3rd page). But what is happening on my situation is that, when you hover the [>>] it shows /page/6 and i think it's getting the total number of posts of the blog.

    And if you click on 3(3rd page). It will still show the 4,5 and [>>] and it should not. like below illustration

    [<<] [<] [1] [2] [c] [4] [5] [>] [>>]

    I hope you understand the scenario and the problem. Thanks again and God bless!

  4. venfrancis
    Member
    Posted 2 years ago #

    oops, sorry mr. moderator. i forgot to read the rules as i'm so exhausted by this problem :(

    anyway, here's the code above

    http://pastebin.com/R8tmSC0i

  5. venfrancis
    Member
    Posted 2 years ago #

    bump....any1? :(

Topic Closed

This topic has been closed to new replies.

About this Topic