WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
Adding co-authors Bio, Avatar & Link but the link to be on the profile of author (6 posts)

  1. nemanja.radevic
    Member
    Posted 1 year ago #

    <?php foreach( get_coauthors() as $coauthor ) : ?>
    <div id="authorinfo" class="columns alpha omega marT30 marB20">
    user_url; ?>"><?php echo get_avatar( $coauthor->user_email, '80' ); ?>
    <h5 class="marB10"><?php _e('By', 'contempo'); ?>: user_url; ?>"><?php echo $coauthor->display_name; ?></h5>
    <p><?php echo $coauthor->description; ?></p>
    <div class="clear"></div>
    </div>
    <?php endforeach; ?>

    i would like to add more to the code

    a link to the authors profile where will be listed all the post he/she wrote instead of going to the website of the author

    and also if possible an excerpt of the bio in the code above instead of all the bio? because there might be authors with big bio

    so basically the coauthor->description; to be excerpt with lets say 200 characters

    and the coauthor->user_url;

    to be coauthors_posts_links

    http://wordpress.org/extend/plugins/co-authors-plus/

  2. nemanja.radevic
    Member
    Posted 1 year ago #

    <?php foreach( get_coauthors() as $coauthor ) : ?>
    <div id="authorinfo" class="columns alpha omega marT30 marB20">
        <a href="<?php echo $coauthor->user_url; ?>"><?php echo get_avatar( $coauthor->user_email, '80' ); ?></a>
        <h5 class="marB10"><?php _e('By', 'contempo'); ?>: <a href="<?php echo $coauthor->user_url; ?>"><?php echo $coauthor->display_name; ?></a></h5>
        <p><?php echo $coauthor->description; ?></p>
            <div class="clear"></div>
    </div>
    <?php endforeach; ?>

    Ok so this is the code what i need is to get this function that i got from template tags

    function coauthors_posts_links( $between = null, $betweenLast = null, $before = null, $after = null, $echo = true ){
    return coauthors__echo('coauthors_posts_links_single', 'callback', array(
    'between' => $between,
    'betweenLast' => $betweenLast,
    'before' => $before,
    'after' => $after
    ), null, $echo );
    }

    Can anyone help?

  3. nemanja.radevic
    Member
    Posted 1 year ago #

    <?php foreach( get_coauthors() as $coauthor ) : ?>
    <div id="authorinfo" class="columns alpha omega marT30 marB20">
        <?php echo get_avatar( $coauthor->user_email, '80' ); ?>
        <h5 class="marB10"><?php _e('By', 'contempo'); ?>: <?php coauthors_posts_links(); ?></h5>
        <p><?php echo $coauthor->description; ?></p>
            <div class="clear"></div>
    </div>
    <?php endforeach; ?>

    So far i came up with this but the avatar i cannot get it correctly linked

    please anyone some help?

    and also there is the avatar and under it the names!

    it should be avatar,name of autor,bio of author and on next line second author and third and so on and also avatar image and name linked
    to coauthors_posts_links page

  4. nemanja.radevic
    Member
    Posted 1 year ago #

    <?php foreach( get_coauthors() as $coauthor ) : ?>
    <div id="authorinfo" class="columns alpha omega marT30 marB20">
        <?php echo get_avatar( $coauthor->user_email, '80' ); ?>
        <h5 class="marB10"><?php _e('By', 'contempo'); ?>: <?php echo(coauthors_posts_links_single($coauthor)); ?></h5>
        <p><?php echo $coauthor->description; ?></p>
            <div class="clear"></div>
    </div>
    <?php endforeach; ?>

    Still problematic ! ouf anyone out there?

  5. nemanja.radevic
    Member
    Posted 1 year ago #

    <?php foreach( get_coauthors() as $coauthor ) : ?>
    <div id="authorinfo" class="columns alpha omega marT30 marB20">
        <?php echo get_avatar( $coauthor->user_email, '80' ); ?>
        <h5 class="marB10"><?php _e('By', 'contempo'); ?>: <?php printf('<a href="%s" title="%s" rel="author">%s</a>',
        get_author_posts_url( $coauthor->ID, $coauthor->user_nicename ),
        sprintf( __( 'Posts by %s', 'co-authors-plus' ), $coauthor->display_name ),
        $coauthor->display_name
        ); ?></h5>
        <p><?php echo(substr($coauthor->description, 0, 140) . sprintf(' <a href="%s" title="Read more" class="bio-readmore">%s</a>',
        get_author_posts_url( $coauthor->ID, $coauthor->user_nicename ),
        "Read more"
        )); ?></p>
            <div class="clear"></div>
    </div>
    <?php endforeach; ?>

    I managed but i could not link the avatar also... can someone please help here and if any better ways of doing this i am open to suggestions!

  6. nemanja.radevic
    Member
    Posted 1 year ago #

    CAN ANYONE HELP HOW TO MAKE THIS BETTER???????????

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic