WordPress.org

Ready to get started?Download WordPress

Forums

Author Page Problems (31 posts)

  1. Silvetti
    Member
    Posted 9 years ago #

    I have a page called author.php and have followed the instructions here http://wordpress.org/support/topic/27554#post-154689 and I use this link in my sidebar:
    '<?php wp_list_authors('optioncount=1&show_fullname=1&exclude_admin=0&hide_empty=1'); ?>'

    But when I click on an author name and am taken to the author.php page the page is blank.

    Am I doing something wrong here?

    Thanks
    S

  2. Jennifer Ledbetter Clay
    Member
    Posted 9 years ago #

    Have a link for us to look at?

  3. Lorelle
    Member
    Posted 9 years ago #

    Does that author have any posts? And are you using permalinks or not? That might help us, too.

  4. Silvetti
    Member
    Posted 9 years ago #

    Sure and thanks for replying:)

    http://www.nuveautek.com/author.txt

    yes, all authors have posts and am using permalinks like this

    /archives/author/charlotte/

  5. Kafkaesqui

    Posted 9 years ago #

    You need to have The Loop in it.

  6. Silvetti
    Member
    Posted 9 years ago #

    Ah thanks Kaf and on my part oooops :)

    UPDATE: Hmmm still not working. Now I get repetive h3 tags for the number of posts for the author (but no name) and nothing else.

    Have I done something wrong?

    http://www.nuveautek.com/author.txt

    Thank you

  7. Kafkaesqui

    Posted 9 years ago #

    This should do it:

    http://paste.uni.cc/7036

    Note my ~notes~ where your post content (i.e. Loop) template tags need to go. I also removed the commented template header, as that's only required for Page (and not general theme) templates.

  8. Silvetti
    Member
    Posted 9 years ago #

    Hi Kaf,

    I owe you a pint :)

    That worked just great although the author is still not showing in the h3 tag. The hard coded 'you are viewing....' displays but not the authors name.

    Thanks again

  9. Kafkaesqui

    Posted 9 years ago #

    Not sure why this doesn't work for everyone...try this version of the code that retrieves the author's info:

    <?php
    if(isset($_GET['author_name'])) :
    $curauth = get_userdatabylogin($_GET['author_name']);
    else :
    $curauth = get_userdata($_GET['author']);
    endif;
    ?>

  10. Silvetti
    Member
    Posted 9 years ago #

    Hmmm not even that variation is working.

    Thanks anyway :)

  11. Kafkaesqui

    Posted 9 years ago #

    Uh, is an author query actually being passed? What I mean is, how are you accessing author posts using this template?

  12. Silvetti
    Member
    Posted 9 years ago #

    Hi Kaf,

    I am using:

    '<?php wp_list_authors('optioncount=1&show_fullname=1&exclude_admin=0&hide_empty=1'); ?>'

  13. Kafkaesqui

    Posted 9 years ago #

    And what is the full url for a particular author? I'm assuming when you click the link for one, all their posts, and only theirs, are displayed.

  14. Silvetti
    Member
    Posted 9 years ago #

    Hi Kaf,

    domain.com/archives/author/john-harrington/

    I would give you the real domain but server is down.

    but the strange this is (although I may have placed some code in the wrong place) that everything I put like author description is repeated for every post snipett.

    Here is my current code - http://www.nuveautek.com/author.txt

    Thanks

  15. Kafkaesqui

    Posted 9 years ago #

    "everything I put like author description is repeated for every post snipett"

    That's because it's a part of the post loop, and every new post displayed will repeat the html and template tags used within it, including author-related tags.

    Do me a favor and instead of using the links, provide query urls to call up the author's posts:

    /?author=1

    (or whatever the correct author ID is) and

    /?author-name=john-harrington

    Do both of these work, or one but not the other, or neither?

  16. Silvetti
    Member
    Posted 9 years ago #

    Hi there, Well......

    /?author=1 works correctly where as author-name does not.

    As regards the loop/ How would I display the author description once and then the posts below it?

  17. Kafkaesqui

    Posted 9 years ago #

    "How would I display the author description once and then the posts below it?"

    <?php echo $curauth->user_description; ?>

    That is, if we can get the code you're using to work. With your example author, is john-harrington the actual login name on the account? Do no logins work when used with ?author_name= ?

  18. Silvetti
    Member
    Posted 9 years ago #

    Hi Kaf,

    Thanks for the reply!

    No John-Harrington is a low-level login and not admin.

    No logins work with author_name for some reason.

    I may download a nightly to see if that fixes this 1.5 problem for me.

    Thanks

  19. Kafkaesqui

    Posted 9 years ago #

    I've looked a bit at the source, and I'm not sure what the problem would be with author_name. I don't think I've ever seen it fail to work. That is, as long as whatever is calling up the link is correctly passing the login and not some other name (first, nick) from the user profile.

  20. DaveQ
    Member
    Posted 8 years ago #

    I'm having a very similar problem here - my author's posts all print out, but none of names or profile info will print. Any pointers would be greatly appreciated as this is not as simple as the codex would lead you to believe.

  21. nieuws
    Member
    Posted 8 years ago #

    Wp can be wicked with links if you changed the link structure. I know have a simular problem as above but then with the month links:

    http://www.nieuwszicht.com

    Does anyone know how to change this?

  22. montag
    Member
    Posted 8 years ago #

    Has this issue been resolved yet? I am having the same trouble described by Silvetti and DaveQ. I am still playing around with WP 1.5.2. Is this still an issue with WP 2? Or will simply upgrading solve it?

    Anyway, here is what I have:

    To get my author links, I have this in my sidebar:

    <?php wp_list_authors('exclude_admin=0'); ?>

    When I click on an author's name (ex: 'montag'), the url looks like this:

    http://www.stumplane.us/wordpress/archives/author/montag/

    My author.php file includes the following (and I've tried substituting all the other examples in the codex to no avail):

    <?php
    if(isset($_GET['author_name'])) :
    $curauth = get_userdatabylogin($_GET['author_name']);
    else :
    $curauth = get_userdata($_GET['author']);
    endif;
    ?>

    I may not have the terminology correct, but it seems as if PHP is not passing the author query. The link is correct, so the list of posts for the author shows, but 'Current Author' doesn't pick up the author name, so the author's nickname and profile do not display.

  23. montag
    Member
    Posted 8 years ago #

    I solved the problem. I had started by copy pasting code from the codex that looked like this:

    <h2>About: <?php echo $curauth->nickname; ?></h2>
    <dl>
    <dt>Website</dt>
    <dd><a href="<?php echo $curauth->user_url; ?>"><?php echo $curauth->user_url; ?></a></dd>
    <dt>Profile</dt>
    <dd><?php echo $curauth->description; ?></dd>
    </dl>

    and

    <h2>Posts by <?php echo $curauth->nickname; ?>:</h2>

    And I encountered the problem detailed in my post above.

    The solution:

    Where it says

    $curauth->nickname;

    I replaced it with

    $curauth->user_nickname;

    Where it says

    $curauth->description;

    I replaced it with

    $curauth->user_description;

    I took the liberty of editing the codex.

  24. snowcrash
    Member
    Posted 8 years ago #

    Hmm, that's strange.
    I had problems with author name not being displayed, but when I edited

    $curauth->user_nickname;

    to:

    $curauth->nickname;

    it worked.

    So shouldn't the wiki be edited to indicate trying both?

  25. spencerp
    Member
    Posted 8 years ago #

    snowcrash, thanks for posting that, that's the only way it worked for me too. =) But, gotta add the codes for the Contact Info yet..then should be set. =) =/

    spencerp

  26. polriid
    Member
    Posted 8 years ago #

    I'm using a WordPress 2.0 template called Alexified to run a multi-user blog. http://www.digitalchalkie.com/

    I'd like readers to be able to click on a post authors name and be taken to an "archives/author/User" page.

    The K2 template does this automatically eg. http://www.paraburdoo.det.wa.edu.au/

    Any suggestions much appreciated.

    Paul

  27. greenveggy
    Member
    Posted 8 years ago #

    hi,
    I copied the code directly from the example given in http://codex.wordpress.org/Author_Templates

    The only thing I changed is $curauth->user_nickname to $curauth->nickname

    When I tested it out, it looks like it only shows the recent (probably current month's) posts. My site is veggyplease.mooo.com and the authors list is in the archive page.

    I've looked at the whole code and Kaf's example (ie. http://paste.uni.cc/7036) and still have no idea what's the problem. Could someone help me please?

  28. greenveggy
    Member
    Posted 8 years ago #

    I'm sorry, it turns out the posts displayed for the authors is not recent, they seem random. One author have 14 posts, but when I click on that author's link, it only shows 2 posts. Could someone help me please?

  29. greenveggy
    Member
    Posted 8 years ago #

    oh, I think I finally see it, it's the most recent two posts by the author.

  30. disembodied
    Member
    Posted 7 years ago #

    Hello all,
    I will revive this thread because I am having a problem linking to my author page.
    Here is the situation, I have an author page and I can call up the page with no problem if i type the link in manually as '/?author=1'.
    However, if i click a link that is generated EITHER via wp_list_authors or the_author_posts_link it produces a malformed URL that looks like this: http://disembodied.us/author/Marcus Schultz-Bergin
    And of course the link doesn't work... Everything I have seen has said the link should be something like ../archives/author/name, but of course mine isn't and moreover no matter what I change 'nickname' it still produces 'Marcus Schultz-Bergin' rather then one word or something else.

    So, is there a way to just have it call the page (dynamically) via the author id or a way to get it to output the link correctly?

    Thanks,
    Marcus Schultz-Bergin

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.