New Posts
Live Radio
Welcome guest, is this your first visit?
  • Login:
Igaming Supershow
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    My Baby Boy ↓
    My Status
     

    Add as a friend
    Join Date
    Nov 2008
    Location
    Myth Drannor
    Posts
    977
    Blog Entries
    2
    Feedback Score
    38 (100%)

    Default Show excerpts on author pages

    I've been having a hell of a time trying to figure this out. I have author/profile pages on this blog. Currently the author pages are displaying the entire post in the "Posts By xxx:" section.

    Everything that I've read says to edit the archive page but I've tried that with no luck (the code is different from the examples used). My gut tells me that I should change something in the loop file but I can't really find anything. I've also tried looking in the author.php page without luck. Here is the page I'm trying to fix:

    Nicole | Betting Basketball

    Anyone have any ideas on how I can display the excerpt instead of the entire post on this page? Thanks!
    Isn't this the sweetest thing in the world: Link - My little girl (S. Frost) is at the bottom, right of this school newsleter :-)
    --------
    Online Gambling Blog | Allin Poker bonus code | Kingdom of Poker (I know...kinda shady)

  2. #2
    vB Guru
    My Status
     

    Add as a friend
    Join Date
    Jan 2009
    Location
    Michigan
    Posts
    253
    Feedback Score
    2 (100%)
    I visited my doctor last week, and he told me I had to stop masturbating. I asked him why, surely it’s not dangerous. He said it was distracting him.

  3. #3
    Senior Member
    My Status
     

    Add as a friend
    Join Date
    Jul 2010
    Location
    Where u wanna B
    Posts
    143
    Feedback Score
    0

    Default

    Spent a long time on this a few years ago - here's the code I use in author.php

    These just show titles but would be very simple to show excerpt or just XXX number of words instead.

    PHP Code:
    <?php
                    
    if(isset($_GET['author_name'])) :
                    
    $curauth get_userdatabylogin($author_name); // NOTE: 2.0 bug requires get_userdatabylogin(get_the_author_login());
                    
    (get_the_author_login());
                    else :
                    
    $curauth get_userdata(intval($author));
                    endif;
                
    ?>            
    <div class="avaright">
    <?php $curauthav $_SERVER['DOCUMENT_ROOT'].'/images/avatars/'.$curauth->ID.'.png';

        
    $avaurl =  '/images/avatars/'.$curauth->ID.'.png';

        if (
    is_file($curauthav))    
        { 
    ?><img src="<?php echo $avaurl?>" width="96px" height="96px" />
        <?php }    else { ?>
        <?php    echo get_avatar($curauth->ID'96' );    }?>
    </div>
    <h1>Author : <?php echo $curauth->first_name?> <?php echo $curauth->last_name?></h1>
     
                <b>Author Since : </b> <?php echo $curauth->user_registered?><br/>
                <?php if($curauth->user_url != "" && $curauth->user_url != "http://") : ?>
                <b> Author Website : </b>  <a href="<?php echo $curauth->user_url?>"><?php echo $curauth->user_url?></a><br/>
                <b>Author Email :  </b> <a href="mailto:<?php echo antispambot($curauth->user_email); ?>">Contact Author</a><br/>
                <b>Author Bio : </b><br/>
                <p><?php echo $curauth->description?></p>
                <?php endif; ?>
    <h4>Recent Articles By <?php echo $curauth->nickname?> :</h4><br/>
    <ul>
                <?php query_posts('author=' $curauth->ID '&cat=1,3855&showposts=50&'); ?>
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <li><strong><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><span><?php the_title(); ?></span></a></strong><br/>
                    On <?php the_time('l jS F Y'); ?><br/><br/>
    </li>
                <?php endwhile; ?>
     
                <?php else : ?>
    </ul>
    <h2>None</h2>
     
    <?php echo $curauth->nickname ?> has not created any posts.
     
                <?php endif; ?>
    </div>
    We use and recommend Servint Web Hosting for cheap, fast, fully managed US based VPS & VDS hosting

  4. #4
    My Baby Boy ↓
    My Status
     

    Add as a friend
    Join Date
    Nov 2008
    Location
    Myth Drannor
    Posts
    977
    Blog Entries
    2
    Feedback Score
    38 (100%)

    Default

    Thanks for the info guys. I'm still a little confused. My author.php page looks like this:

    <?php
    /**
    * The template for displaying Author Archive pages.
    *
    * @package WordPress
    * @subpackage Twenty_Eleven
    * @since Twenty Eleven 1.0
    */

    get_header(); ?>

    <section id="primary">
    <div id="content" role="main">

    <?php if ( have_posts() ) : ?>

    <?php
    /* Queue the first post, that way we know
    * what author we're dealing with (if that is the case).
    *
    * We reset this later so we can run the loop
    * properly with a call to rewind_posts().
    */
    the_post();
    ?>

    <header class="page-header">
    <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
    </header>

    <?php
    /* Since we called the_post() above, we need to
    * rewind the loop back to the beginning that way
    * we can run the loop properly, in full.
    */
    rewind_posts();
    ?>

    <?php twentyeleven_content_nav( 'nav-above' ); ?>

    <?php
    // If a user has filled out their description, show a bio on their entries.
    if ( get_the_author_meta( 'description' ) ) : ?>
    <div id="author-info">
    <div id="author-avatar">
    <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 60 ) ); ?>
    </div><!-- #author-avatar -->
    <div id="author-description">
    <h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
    <?php the_author_meta( 'description' ); ?>
    </div><!-- #author-description -->
    </div><!-- #entry-author-info -->
    <?php endif; ?>

    <?php /* Start the Loop */ ?>
    <?php while ( have_posts() ) : the_post(); ?>

    <?php
    /* Include the Post-Format-specific template for the content.
    * If you want to overload this in a child theme then include a file
    * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    */
    get_template_part( 'content', get_post_format() );
    ?>

    <?php endwhile; ?>

    <?php twentyeleven_content_nav( 'nav-below' ); ?>

    <?php else : ?>

    <article id="post-0" class="post no-results not-found">
    <header class="entry-header">
    <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
    </header><!-- .entry-header -->

    <div class="entry-content">
    <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
    <?php get_search_form(); ?>
    </div><!-- .entry-content -->
    </article><!-- #post-0 -->

    <?php endif; ?>

    </div><!-- #content -->
    </section><!-- #primary -->

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    I'm using a modified version of the basic twentyten theme and I also use a profile pic plugin. The excerpts show on the index properly and on single posts (More basketball news) but nothing I've done so far will change it on the author pages. I'm sure that I'm overlooking something simple so thanks for bearing with me. I also just installed an excerpt plugin but it didn't work.
    Isn't this the sweetest thing in the world: Link - My little girl (S. Frost) is at the bottom, right of this school newsleter :-)
    --------
    Online Gambling Blog | Allin Poker bonus code | Kingdom of Poker (I know...kinda shady)

  5. #5
    My Baby Boy ↓
    My Status
     

    Add as a friend
    Join Date
    Nov 2008
    Location
    Myth Drannor
    Posts
    977
    Blog Entries
    2
    Feedback Score
    38 (100%)

    Default

    - double post
    Last edited by Josh; 08-29-2011 at 11:39 PM.
    Isn't this the sweetest thing in the world: Link - My little girl (S. Frost) is at the bottom, right of this school newsleter :-)
    --------
    Online Gambling Blog | Allin Poker bonus code | Kingdom of Poker (I know...kinda shady)

  6. #6
    My Baby Boy ↓
    My Status
     

    Add as a friend
    Join Date
    Nov 2008
    Location
    Myth Drannor
    Posts
    977
    Blog Entries
    2
    Feedback Score
    38 (100%)

    Default

    I got it fixed using the WP Limit Posts Automatically plugin (thanks CK!)
    Isn't this the sweetest thing in the world: Link - My little girl (S. Frost) is at the bottom, right of this school newsleter :-)
    --------
    Online Gambling Blog | Allin Poker bonus code | Kingdom of Poker (I know...kinda shady)


 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Powered by vBulletin® Version 4.1.5
Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.
SEO by vBSEO 3.6.0
Affiliate Program Consultant