Support » Plugins » How to make my own author archive page Please Help!!

  • Hi everyone, I’m new to WordPress, but not necessarily to web dev…

    I’m having trouble figuring out how I can make an author archive page…i would use the one provided, but I need to make it *without* the header image.

    So I tried using my own “fake header” to load the functions and other necessary parts of the page other than the header image and navigation. I can’t seem to get the php to run correctly. Am i doing this incorrectly?


    <?php require('fakeheader.php'); ?>
    <?php get_header(); ?>
    <?php is_author(2); ?> \this may not work, but I'm trying to call the posts of the author whose key is "2"
    <div id="content">test
    <?php if (have_posts()) : ?>
    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
    <h2 class='archives'>Author Archive</h2>
    <?php }

    elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    <h2>Blog Archives</h2>
    <?php } ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="entry">
    <h3 class="entrytitle" id="post-<?php the_ID(); ?>"> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
    <?php the_title(); ?>
    </a> </h3>
    <div class="entrymeta">
    Posted <?php
    the_time('F j, Y ');
    $comments_img_link= '<img src="' . get_stylesheet_directory_uri() . '/images/comments.gif" title="comments" alt="*" /><strong>';
    comments_popup_link($comments_img_link .' Comments(0)', $comments_img_link .' Comments(1)', $comments_img_link . ' Comments(%)');
    edit_post_link(__(' Edit'));?>
    </strong> </div>
    <div class="entrybody">
    <?php the_content(__('Read more &raquo;'));?>
    <?php trackback_rdf(); ?>
    <?php endwhile; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    <?php posts_nav_link(' — ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?>
    <?php get_footer(); ?>

Viewing 1 replies (of 1 total)
  • 1. Don’t post long code here… nobody raeds it :0

    2. <?php require('fakeheader.php'); ?>
    <?php get_header(); ?>

    You can’t have both: get_header is defined WP function and it will always call the header.php of the theme.
    If you want your own – include it with
    <?php include (TEMPLATEPATH . '/fakeheader.php'); ?>
    Use it lieterally as it is and make sure the feakeheader.php file is in the theme’s directory.

    3. The rest is complicated for me – I am not a coder. Just naming it “author.php” should work without any code hocus-pocus. WP knows what an author template is.

    Special attention to the References at the bottom of the page – don’t come back before reading those!!!

Viewing 1 replies (of 1 total)
  • The topic ‘How to make my own author archive page Please Help!!’ is closed to new replies.