Support » Fixing WordPress » How do I create author pages?

  • Resolved FunkyDung


    Before anyone asks, yes, I read the relevant forum threads on author templates, etc. I’m still clueless.

    I have a call to list_authors in my sidebar. When I click on one of the authors, I get a 404 error.

    I’m using WordPRess 2.0. I have an author.php template file. My permalink structure is /archive/%post_id%. The author pages should be found at archive/%author%, but they aren’t.

    My main page is here:

    One of the author pages I’d like to create:

    The author.php file I’m trying to use:

    <?php get_header(); ?>
    <div id="content" class="narrowcolumn">
    <!-- This sets the $curauth variable -->
    if(isset($_GET['author_name'])) :
    $curauth = get_userdatabylogin($author_name);
    else :
    $curauth = get_userdata(intval($author));

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

    <!-- The Loop -->
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <a>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
    <?php the_title(); ?></a>,

    <?php the_time(‘d M Y’); ?> in <?php the_category(‘&’);?>

    <?php endwhile; else: ?>
    <?php _e(‘No posts by this author.’); ?>

    <?php endif; ?>
    <!– End Loop –>

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • Maybe it is here:

    in particular this:
    2.0 bug requires

    That change had no effect.

    Is there some step that I have missed? Is there a step-by-step tutorial somewhere on how to set up author pages? I didn’t see one in the codex or the forums (at least not one I could comprehend in my WP newbiness).

    I’m not experiencing your problem on 2.0 or 2.1 on a localhost xampp system nor on a linux host at 2.1.

    I used your exact code (more about that later) and your Permalink settings.

    Here’s what I did:
    I put a wp_list_authors() tag in my themes/default/sidebar.php file. Then created a themes/default/author.php file with your code. Clicked on an author’s nickname in my sidebar and got a type url in my browser with their posts displayed.

    Take a look at this for a better display of your author’s posts Author_Templates#Listing_Entries_via_The_Loop.

    Not too sure what to tell you. Maybe start with an empty .htaccess file and Update Your Permalink Structure.

    Is there any significance to the choice of wp_list_authors() over ‘list_authors()?

    I wondered if maybe by .htaccess file was screwed up. Hopefully I wouldn't be beaten with a LART (aka Clue Bat or Clue by 4) if I said that setting that file up properly is opaque to me. ;) Here's my .htaccess:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    # Redirect FeedBurner to your own Feed
    RewriteBase /
    RewriteRule ^feedburner_733196/?$ /feed/ [R,L]
    RewriteCond %{HTTP_USER_AGENT} ^FeedBurner.*$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # These Rules redirect all feed Traffic to FeedBurner
    RewriteBase /
    RewriteCond %{QUERY_STRING} ^feed=(feed|rdf|rss|rss2|atom)$
    RewriteRule ^(.*)$ [R,L]
    RewriteRule ^(feed|rdf|rss|rss2|atom)/?(feed|rdf|rss|rss2|atom)?/?$ [R,L]
    RewriteRule ^wp-(feed|rdf|rss|rss2|atom).php [R,L]
    # These are the standard WordPress Rules
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php

    # END WordPress’

    Do I need to add/modify anything?

    BTW, thanks for the help so far. It’s nice to find a forum in which a newbie isn’t dismissed as a pest. 😉

    wp_list_authors() could be described as a wrapper to list_authors. The difference is that one passes all the parameters as one string and the other passes each parameter separated by commas.

    Can’t address your .htaccess I was just suggesting start with an empty .htaccess, let WordPress generate a new set of rules then try that. I’m LART also. 😉

    I’ve discovered that my archives and category pages give me 404 errors as well. I guess it’s time to figure out how htaccess works…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How do I create author pages?’ is closed to new replies.