Support » Fixing WordPress » Current Author

  • Hey – I’m new to wordpress, naturally, and have searched high & low for a way to display a “current author” on an authors’ archive page.

    I understand how to get an author name displayed within the loop, but cannot find anything for displaying an author name outside of the loop (author name at top of page). There’s got to be a simple way that I’m merely overlooking.

    The closest I can come is by using the get-author-profile plugin: http://guff.szub.net/2005/01/31/get-author-profile/

    But it seems as though this should be doable without a plugin. Thanks.

Viewing 15 replies - 31 through 45 (of 66 total)
  • I could be wrong, but looking at the code doesn’t the username and nickname have to be the same in order for the nickname to show up? Check that for the two authors who do show up.

    Probably because the nickname is used for the permalink?

    It’s pretty stupid that the nickname and the username have to be the same. What is the point in having those variables if you can’t assign them to something different?

    If Wp 1.5 can do all of this with just a few tags, why doesn’t somebody include a template in the default theme??????????????????????????????

    When someone enters a profile, clicking on their names (at the end of, say, a comment) brings me to the url if they have provided one. Is there a way simply to bring me to the page with the info hat they filled in?

    clayfx

    (@clayfx)

    How is it possible, in the author.php page, and outside the loop, to display the number of posts already written?
    I’ve try to put:

    <?php $posts = get_usernumposts($user_ID);
    echo $posts;?>

    before the loop, but it destroys it.

    Thanks.

    clayfx

    (@clayfx)

    Finally it works fine with this code:

    <?php $nposts = get_usernumposts($author);
    echo $nposts;?>

    i am using the code above for 1.5,


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

    but when i click the links on my index page (generated by wp_list_authors, the only author profiles that appear are the authors with single names. one author has a one word login and nick name; her profile shows up fine. other authors have spaces in their logins and nicknames; their profile pages are blank. is there something i can do about this? thanks.

    I started to use WP say few days ago. I am not well versed with the codes used. Anyway, I’d like to display my name or rather my nickname after every blog entry. How do I do it? What should I add or change? I’ve been searching high and low for the codes or something like that, but I ended up confusing myself even more.

    Here is my blog:

    http://angelicious.ghostelf.com

    Look at my blog entries – my nickname is nowhere to be found, there’s no time display. I don’t know how and where to change the codes. Please help.

    You will be happy to find the_author Template Tag in the handy Codex!

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

    This will require you to edit your template files, probably for the first time, I guess? It’s not too hard.

    Open the file located in your directory: wp-content/themes/default/index.php

    Search for: <!-- by <?php the_author() ?> -->

    Lucky you they already but the author link in the template, but used HTML comments so it doesn’t appear. So remove the commenting so you only have:

    by <?php the_author() ?>

    Now test it! It should work. Now you can try moving it around to another place like after your post.

    If you go to the main Template Tags page, you can see a whole list of things you can add about your author on each post.
    http://codex.wordpress.org/Template_Tags

    This works great for an author of a post but what about comments. Now is there a way to grab the author profile page for a comment_author? Assuming of course they are an author.

    here’s a simple workaround: in the author profiles in admin area, put the link to their profile page… and it will go to their profile.

    that’s the KISS option. ๐Ÿ™‚

    hehe thanks nearlythere…

    theres gotta be a more precise way though right?

    So…you need to check to see if the commenter is an author, if so make the comment_author link go to the author.php page displaying their info.

    does that sound right?

    whelp, wordpress already does it for you. it’s already-built-in functionality.

    if you are logged in, it recognizes you are an author. above the comment form you see:

    Logged in as somebody. Logout ร‚ยป

    … then… it adds a link to the whatever link you put in your profile.
    …/wp-admin/profile.php

    so i’m saying, just add the link to author page there.

    but if you want it to do it authomagically, just check in the code above the comment form, and maybe you can send it as a hidden field?

    thanks nearlythere, i’d rather not do any workarounds like that. especially with over 20 members, if more sign up I want profiles to be done automatically…

    anyway here is the code you are referring to, it’s an interesting idea. Not sure how to implement it.

    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>

    by the way, with help from another thread I was able to output whether or not the user was registered or guest through this code.

    if ($comment->user_id) echo "Registered User";
    else echo "Guest";

    Gotta go to work but how could I make it a link to the author page and which variables to use when calling up the info? My current author page uses:

    curauth->user_url, etc…

Viewing 15 replies - 31 through 45 (of 66 total)
  • The topic ‘Current Author’ is closed to new replies.