I see that you can manually specify a particular user. But is there a way to have the list automatically display the latest posts by whoever is logged in? I'd like each author to be able to see a list of their own latest posts.
I see that you can manually specify a particular user. But is there a way to have the list automatically display the latest posts by whoever is logged in? I'd like each author to be able to see a list of their own latest posts.
No, this feature is not built into the plugin. I believe you could modify the plugin using the wp_get_current_user() function and hopefully come up with something pretty close to what you're describing though.
http://codex.wordpress.org/Function_Reference/wp_get_current_user
Ok, I found a solution. First, I'm using the Shortcode Exec PHP plugin to allow me to execute PHP on pages. Then I use this PHP:
global $current_user;
get_currentuserinfo();
$my_posts = get_posts( array( 'author' => $current_user->ID, 'numberposts' => 100 ) );
$output = '
<ul>';
foreach ( $my_posts as $my_post ) {
$output .= '
<li><a>ID ) . '">' . apply_filters( 'the_title', $my_post->post_title, $my_post->ID ) . '</a>, (<a>ID . '&action=edit" target="_blank">Edit</a>)</li>
';
}
$output .= '</ul>
';
return $output;
That loads all the posts by whoever's logged in (up to 100). If you're not logged in, it just shows all the posts (up to 100).
I'm glad to hear you found a solution! Thanks for posting it.
You must log in to post.