Aşağıdaki kod 1 id li kullanıcı tarafından eklenen yorumları listeler. 1 yerine o sayfadaki loopdan user_id sini çekebilirsin.



$args = array(
'user_id' => 1, // use user_id
);
$comments = get_comments($args);
foreach($comments as $comment) :
echo($comment->comment_author . '
' . $comment->comment_content);
endforeach;



Aşağıdaki kod ise 1 id li kullanıcı tarafından eklenen başlıkları listeler. yine 1 yerine o kullanıcının id sini döndürebilirsiniz.


$query = new WP_Query( array( 'author' => 1 ) );

if ( $query->have_posts() ) {
echo '
    ';
    while ( $query->have_posts() ) {
    $query->the_post();
    echo '
  • ' . get_the_title() . '
  • ';
    }
    echo '
';
}

wp_reset_postdata();