Post list based on the user that is logged in

there you go, i’m not the only one trying to bring back-end functionality to the front-end.
anyway its not that hard go to your “USER DASHBOARD” template’s file and locate where the loop starts something like:

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

and just above it paste this code:

<?php
/* First get the user info */
get_currentuserinfo();
/* Then query_posts by user id */
query_posts(array('author'=>$current_user->ID));
/* And Last just loop thrugh the posts */
?>

hope this helps 🙂

Leave a Comment