Herhangi bir ücret talep etmeyecektim merak ettim ne kadar vereceğini sadece tek satır kod bunu halleder...
query_posts('author='.$current_user->ID);
eğer giriş yapan kullanıcı yoksa 0 a eşitlenir ve bütün kullanıcı mesajlarını görüntüler. Onun için bir if kontrolü ile eğer 0 a eşitse hiç o id sahip olmayan bir id ye eşitleyin yada bir kullanıcı açın örneğin adı konusuz olsun bu konusuz kullanıcımızın id side 2 olsun
$uid = $current_user->ID;
if(!$current_user->ID){
$uid = 2;
}
query_posts('author='.$uid);
gibi
Not: Bu kod while den önce gelmeli.