Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134490

downFast on "How to get authors name's posts?"

$
0
0

I have a site where users are not logged in and they can post, I am using a plugin called http://wordpress.org/plugins/user-submitted-posts/. Their posts are considered as posted by Admin, however, since in the form when they submit the post they can insert their name, wordpress shows in the admin panel their name.

By doing this i can get a list of the names:

<ul>
<?php
 $args= array(
  'posts_per_page' => -1
);
  query_posts($args);
?>

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<li>
    <?php echo get_the_author();  ?>
</li>
    <?php endwhile; ?> <?php endif; ?>
</ul>

But if I add this:

<?php echo get_the_author_posts(); ?>

I get a list of the different names but each of them shows me the same number of posts, e.g.:

Name1 22
Name2 22
Name3 22
Name4 22

This happens because these are not actual users and their are posting on the behalf of the admin.

So how can I get the the link to each post based on the authors names as they display on the admin panel and not by registered users?


Viewing all articles
Browse latest Browse all 134490

Trending Articles