• Resolved zwrodgers

    (@zwrodgers)


    I am trying to incorporate the plugin into my author.php file (site has multiple authors), which I’m able to do, semi-successfully, using your example. There are two items that aren’t displaying properly:

    1) author post archives not showing at all

    2) sidebar is being displayed at the bottom of the page (after all other content)

    I’m not a very good coder (teaching myself as I go), so my code could be terribly messy:

    <?php
    get_header(); ?>
    
    <div id="container">
    <div id="content" role="main">
    
    <?php
    
    if ( have_posts() )
    the_post();
    ?>
    
    <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'Lucid' ), "<span class='vcard'><a class='url fn n' href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a></span>" ); ?></h1>
    
    <?php
    if (function_exists ('wpb_the_biography_box')) {
    wpb_the_biography_box ();
    }
    
    rewind_posts();
    
    get_template_part( 'loop', 'author' );
    ?>
    </div><!-- #content -->
    </div><!-- #container -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    I am able to get the author post archives displaying correctly like this (BUT the sidebar is still messed up):

    <?php get_header();
    ?>
    
    <div id="content-area" class="clearfix">
      <div id="left-area">
         <?php get_template_part('includes/breadcrumbs', 'index');
         ?>
    
         <!-- This sets the $curauth variable -->
    
         <div><?php
    $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
           ?>
           <h1> <p style = "font-size: 40px"><?php echo $curauth->nickname;
              ?></p></h1>
           <?php the_author_image();
           ?>
           <br>
           <dl>
              <dd><h4><?php echo $curauth->user_description;
                ?></h4></dd>
           </dl></div>
    
         <h3>Posts by <?php echo $curauth->nickname;
           ?>:</h3>
         <br>
         <ul>
    
           <?php if (have_posts()) : while (have_posts()) : the_post();
           ?>
           <?php get_template_part('includes/entry', 'index');
           ?>
           <?php
    endwhile;
    if (function_exists('wp_pagenavi')) {
      wp_pagenavi();
    }
    else {
      get_template_part('includes/navigation','entry');
    }
    else:
    get_template_part('includes/no-results','entry');
    endif;
           ?>
    
           <!-- end #left-area -->
    
           <?php if ( ! $fullwidth ) get_sidebar();
           ?>
    
           <!-- end #content-area -->
    
           <?php get_footer();
           ?>

    I am using the Lucid theme from Elegant Themes. Sorry for the long post and thank you SO MUCH for any assistance you might be able to provide!

    https://www.ads-software.com/extend/plugins/wp-biographia/

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘author.php’ is closed to new replies.