The current author profile on a clean page ? Very hard in fact. (13 posts)

  1. HapaxLegomen
    Posted 10 years ago #

    Like it is explain here : http://codex.wordpress.org/Author_Templates
    I have creat an author.php template in my WP theme.

    My author.php code :

    Template Name: Auteurs
    <?php get_header(); ?>

    if(get_query_var('author_name')) :
    $curauth = get_userdatabylogin(get_query_var('author_name'));
    else :
    $curauth = get_userdata(get_query_var('author'));
    <h2>About: <?php echo $curauth->user_nickname; ?></h2>
    <dd>user_url; ?>"><?php echo $curauth->user_url; ?></dd>
    <dd><?php echo $curauth->user_description; ?></dd>
    <?php get_footer(); ?>

    I have made a link at the end of posts : when you click on the post author name, you go on his particular page.
    I use for that :

    <?php the_author_posts_link(); ?>

    And... it doesn't work. Nothing appear.

    Oh ! I have made a page called "membres" with the template author.php associate, but it seems to be useless.

    I have try the Get author plugin http://guff.szub.net/2005/01/31/get-author-profile/ and it doesn't work for me. (I use several plugin whithout problem).

    I just want the profile information of the current author on a page... and it already takes several hours of my short human life... Why ? Why so many complexity on earth... I'm very tired... I'm waiting a charity mouvement around my case (with songs and flowers if possible) :-). Please.

  2. HapaxLegomen
    Posted 10 years ago #

    You can see an example of this crash here :


    Note that $curauth is taken by my author.php, but not translate into data ! ... ???

  3. nearlythere
    Posted 10 years ago #

    hello HapaxLegomen,

    your code is getting garbled, so i can't review it. either makes sure to wrap lines in backticks or use a service like http://pastebin.com/

    can you send any links to your example website?

    i am using the author template with success. this is the code i am using for my author.php, see http://pastebin.com/397539 (copy and paste into new .php document, and save to your theme folder as author.php )

    i had some trouble with my author names though, so i link to the author page like this:
    <?php the_author_posts_link('nickname'); ?>

    and this goes to pages like this:

    i made a LIST of authors (maybe what you're calling "membres ") using an custom template, uploaded to my theme directoy, which i called "Authors Template"; then i created a new page, called it "authors" then selected:
    Page Template: [Authors Template] from pull down menu under entry text field.

    this is the code for my authors template: http://pastebin.com/397543 (copy and paste into new .php document, and save to your theme folder as author-list.php )

    please send links, it's easier to help!

  4. HapaxLegomen
    Posted 10 years ago #

    Hello Nearlythere,

    I have made what you say but having the same problem : profile information aren't display.

    Go here : http://www.cometes.org/2005/10/17/antony-mckenna-moliere-dramaturge-libertin/

    and click on the author link at the end of the page. You will arrive here :

    Whitout nothing only posts !

    And I must add I will need after to change the url in a french on, whith "membres" instead "author" in permanent link... So much work for this week...

    Thankx for your help

  5. nearlythere
    Posted 10 years ago #

    can you try linking to author page via

    <?php the_author_posts_link('nickname'); ?>

    just to see if it works differently.

  6. HapaxLegomen
    Posted 10 years ago #

    I have made. It doesn't change anything. ! :-X I don't understand. I'm on WP1.5.2.

  7. nearlythere
    Posted 10 years ago #

    okay, since it is working with the post listing, i am lost..

    this is a silly question, but in your wp-admin area, do you have user information for 'website' 'profile' filled out for that author?

    go to somewhere like: yoursite.com/wp-admin/user-edit.php

  8. HapaxLegomen
    Posted 10 years ago #

    Badly, All these fields are full of information.

  9. nearlythere
    Posted 10 years ago #

    if you're using the nickname i don't know why it's still getting the authorname with the hyphen...

  10. HapaxLegomen
    Posted 10 years ago #

    Because the nickname and the author name are the same. This is a scientific revue, no funny nickname on it... You think it's the problem ???

  11. nearlythere
    Posted 10 years ago #

    i remember reading something about nicknames and author names and the ensuing problems.



    i haven't done any tests myself.

  12. nearlythere
    Posted 10 years ago #

    also, have you seen this plugin?


  13. sarahd
    Posted 10 years ago #

    It does seem like there is a problem with the author.php page's function when an author's user name and nickname are not the same. Instead of using the code suggested in the codex (http://codex.wordpress.org/Author_Templates), I used the example from http://centripetalforces.com/2005/04/30/under-the-wp-bonnet-2/, which is referenced in another thread. This lets you work within the loop in your author.php page to show the author's information once, with posts listed after.

Topic Closed

This topic has been closed to new replies.

About this Topic