Forums

[plugin list-posts-by-author ] - doesn't work for WP 2.9.2 (3 posts)

  1. talgalili
    Member
    Posted 2 years ago #

    I tried putting this into the "single.php" :

    <?php list_posts_by_author('all', 'all', 'page', 'date', 'asc', 'ul', 'h3', '#000000', 'italic', '_self'); ?>

    <?php list_posts_by_author('all', 'none', 'page', 'date', 'asc', 'ul', 'h3', '#000000', 'italic', '_self'); ?>

    <?php list_posts_by_author(the_author(), 'none', 'page', 'date', 'asc', 'ul', 'h3', '#000000', 'italic', '_self'); ?>

    And none worked.

    http://wordpress.org/extend/plugins/list-posts-by-author/

  2. rodrigobarba
    Member
    Posted 2 years ago #

    I'm trying this plugin too.

  3. Taylor Baybutt
    Member
    Posted 1 year ago #

    I just got finished working on a new way to do what this plugin does because it messed up a bunch of stuff on my site even though it was working. Here is my solution:

    put this in functions.php

    function authorarchive() {
    global $wpdb;
    $authors = $wpdb->get_results("SELECT ID, user_nicename, display_name from $wpdb->users ORDER BY display_name ASC");
    foreach ($authors as $author) {
    		$authorid = $author->ID;
        	$authordispname = $author->display_name;
    		echo "<div id='author-archive-".$authorid."' class='author-archive'>";
        	echo "<h2>".$author->display_name."</h2>";
    $autharchargs = array(
    		'post_status' => 'publish',
     		'orderby' => 'date',
     		'order' => 'asc',
    		'author_name' => $author->user_nicename,
     		);?>
    
     		<div id="author-posts-<?php echo $authorid ?>"><ul>
    <?php query_posts( $autharchargs ); while (have_posts()) : the_post(); ?>
        <li><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
    
    	<?php
    	endwhile;
            echo "</ul>";
    	echo "</div>";
    	echo "</div>";
    	}
    	}?>

    you can call the function in your template with this

    <?php authorarchive(); ?>

    This version includes admin.
    to exclude admin, add
    where id != 1 after $wpdb->users
    style as needed, should have good css selectors for all purposes.

Topic Closed

This topic has been closed to new replies.

About this Topic