Show “My Posts”
-
Can anyone tell my why this code doesn’t work?
<?php if (is_user_logged_in()){ global $current_user; get_currentuserinfo(); query_posts('author_name = $current_user->user_login'); } else { echo "Please register!"; }; ?>
It retrieves all posts, but not only current user’s posts.
Anyone can help?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Show “My Posts”’ is closed to new replies.