WordPress.org

Ready to get started?Download WordPress

Forums

Recent Posts Widget Extended
Display Author (4 posts)

  1. jamo_dodger
    Member
    Posted 1 year ago #

    Hi great plugin btw.

    I was just wondering if there was any way i could display the author with every post? I am currently showing the time posted and excerpt but there isnt an option for author. How can i do this?

    Thank you

    James

    http://wordpress.org/extend/plugins/recent-posts-widget-extended/

  2. Satrya
    Member
    Plugin Author

    Posted 1 year ago #

    Not for now, but it would be a great new features in the future release :)

  3. alfalipo
    Member
    Posted 1 year ago #

    For jamo_dagger, you can add author picture and author name using wordpress default function, here's the step:

    1. Search for file widget-recent-posts-extended.php
    2. Search for line you want to place picture and name, in this example the image and name will display above the excerpt:

    <?php if( $excerpt == true ) {  ?>
    <div class="rpwe-summary"><?php echo rpwe_excerpt( $length ); ?></div><?php } ?>

    modify that line to:

    <?php if( $excerpt == true ) {  ?>
    <div class="author-section">
       <?php echo get_avatar( $id_or_email, 75, $default, $alt ); ?>
       <span class="author-name">Author: <?php the_author() ?></span>
    </div>
    <div class="rpwe-summary"><?php echo rpwe_excerpt( $length ); ?></div><?php } ?>

    note that you must fill and enabled Excerpt option.

    For the plugin author: plugin yang bagus :)

  4. alfalipo
    Member
    Posted 1 year ago #

    Just re-check my code above, sorry for the mistake, the right one is below

    <?php if( $excerpt == true ) {  ?>
    <div class="author-section">
       <?php echo get_avatar( get_the_author_email(), '75' ); ?>
       <span class="author-name">Author: <?php the_author() ?></span>
    </div>
    <div class="rpwe-summary"><?php echo rpwe_excerpt( $length ); ?></div><?php } ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic