• silvetti

    (@silvetti)


    I have a page called author.php and have followed the instructions here http://ww.wp.xz.cn/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

Viewing 15 replies - 1 through 15 (of 30 total)
  • Have a link for us to look at?

    Lorelle

    (@lorelle)

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

    Thread Starter silvetti

    (@silvetti)

    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/

    Kafkaesqui

    (@kafkaesqui)

    You need to have The Loop in it.

    Thread Starter silvetti

    (@silvetti)

    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

    Kafkaesqui

    (@kafkaesqui)

    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.

    Thread Starter silvetti

    (@silvetti)

    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

    Kafkaesqui

    (@kafkaesqui)

    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;
    ?>

    Thread Starter silvetti

    (@silvetti)

    Hmmm not even that variation is working.

    Thanks anyway 🙂

    Kafkaesqui

    (@kafkaesqui)

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

    Thread Starter silvetti

    (@silvetti)

    Hi Kaf,

    I am using:

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

    Kafkaesqui

    (@kafkaesqui)

    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.

    Thread Starter silvetti

    (@silvetti)

    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

    Kafkaesqui

    (@kafkaesqui)

    “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?

    Thread Starter silvetti

    (@silvetti)

    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?

Viewing 15 replies - 1 through 15 (of 30 total)

The topic ‘Author Page Problems’ is closed to new replies.