WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding author name to Smart Archives Reloaded plugin (3 posts)

  1. nli
    Member
    Posted 4 years ago #

    I couldn't find an archives plugin that would show name of the author after the title of each post in a multi-author blog.

    I thought that maybe it could be possible to hack Smart Archives Reloaded plugin to do that.

    One should probably add something to the following piece of code:


    // Get post links for current month
    $post_list = '';
    foreach ( self::$monthsWithPosts[$current][$i]['posts'] as $post )
    $post_list .= sprintf("\t

  2. %s
  3. \n", get_permalink($post->ID), $post->post_title);

    Could anyone tell me how to modify the code?

    Or, tell me if there is a plugin that is already doing what I'm looking for.

  • nli
    Member
    Posted 4 years ago #

    Trying again to add the code:

    // Get post links for current month
    $post_list = '';
    foreach ( self::$monthsWithPosts[$current][$i]['posts'] as $post )
    $post_list .= sprintf("\t<li><a href='%s'>%s</a></li>\n", get_permalink($post->ID), $post->post_title);
  • nli
    Member
    Posted 4 years ago #

    New version of the plugin has that option included.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags