Digital Tools For Architects Rotating Header Image

My Comments

[php]

if(get_query_var(‘author_name’)) :

$curauth = get_userdatabylogin(get_query_var(‘author_name’));

else :

$curauth = get_userdata(get_query_var(‘author’));

endif;

$querystr = ”

SELECT comment_ID, comment_post_ID, post_title, comment_content

FROM $wpdb->comments, $wpdb->posts

WHERE user_id = $curauth->ID

AND comment_post_id = ID

AND comment_approved = 1

ORDER BY comment_ID DESC

“;

 

$comments_array = $wpdb->get_results($querystr, OBJECT);

 

if ($comments_array): [/php]

<h2>Recent Comments </h2>

<ul>

foreach ($comments_array as $comment):

setup_postdata($comment);

echo ”

“;

endforeach; ?>

</ul>

endif; [/php]

This content is published under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported license.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>