WordPress.org

Ready to get started?Download WordPress

Forums

link to posts by user? (4 posts)

  1. fightingfriends
    Member
    Posted 8 years ago #

    I'm trying make something in the sidebar that lists the authors with their number of posts beside. I want it to work much like categories but I don't want to make the user click a catergory box with their name in it.

    Right now I have copied and edited the code from the users.php file that shows the number of posts but has a link to edit it. I had the idea of using a searchquery as the link but the searchs don't search for authors.

    If you want to have a look it's here, http://www.fightingfriends.com/wordpress/

    Any help would be greatly appreaciated.

  2. Jennifer Ledbetter Clay
    Member
    Posted 8 years ago #

    http://codex.wordpress.org/Template_Tags/the_author_posts_link

    Not sure how you can incorperate that into what you are wanting to do but it is a start :)

    Have fun, please let us know how you get this to work. I'd love to do the same on one of my blogs!

  3. fightingfriends
    Member
    Posted 8 years ago #

    Hrmm, 'must be used inside the loop', but yeah it's a very good start, thanks! I'll let you know if I somehow work out an ugly way to make it work.

  4. fightingfriends
    Member
    Posted 8 years ago #

    Hey, I made it work, Just used the post ID in the link you get after using the <?php the_author_posts_link('idmode'); ?> as the $numposts in the code copied from users.php

    Sorry it's not worded better, I'm very new to PHP

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.