Hi,
I found this piece of code which displays the posts of a specified author:
<?php
$numposts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_author = 1");
echo "Posts by Author 1";
<ul>
foreach ($numposts as $numpost) {
echo "
<li>".$numpost->post_title."</li>
";
}
</ul>
?>
All I need to do now is alter this to display the posts of the currently logged in user instead.
Anyone know how to do this?
Cheers!