Manually Display Images
-
I am manually outputting user specific recent comments on author pages and I wasn’t sure how to output the image in my code. I currently have the following in my author template file, which lists the post title (with a link to the comment), the comment itself, and the comment post date. How can I output a thumbnail of the image with the zoom feature?
$author = get_query_var( ‘author’ );
$author = get_user_by( ‘id’, $author );$args = array(
‘user_id’ => $author->ID,
‘number’ => 10, // how many comments to retrieve
‘status’ => ‘approve’
);$comments = get_comments( $args );
if ( $comments )
{
$output.= “- \n”;
- ‘;
$output.= ‘<h4>comment_ID ).'”>’;
$output.= get_the_title($c->comment_post_ID).’</h4>’;
$output.= ‘<p>’.$c->comment_content.'</p>’;
$output.= ‘<span class=”pro-comment-date”>Posted on: ‘. mysql2date(‘m/d/Y’, $c->comment_date, $translate).'</span>’;
$output.= “
foreach ( $comments as $c )
{
$output.= ‘\n”;
}
$output.= ‘‘;
echo $output;
} else { echo “No reviews made recently”;} - ‘;
- The topic ‘Manually Display Images’ is closed to new replies.