Retrieving Post ID For Comments?
-
I am trying to have a custom field showed on my recent comment code. Any ideas?
<?php $image = get_post_meta($post->ID, 'photo', true); $comments = get_comments('number=30'); foreach($comments as $comm) : $url = '<a href="'. get_permalink($comm->comment_post_ID).'#comment-'.$comm->comment_ID .'" title="'.$comm->comment_author .' | '.get_the_title($comm->comment_post_ID).'">' . $comm->comment_author . '</a>'; ?> <li> <?php echo get_avatar($comm->comment_author_email, 30); ?> <strong><?php echo $url; ?></strong> <p><?php echo $comm->comment_content; ?></p> <img src='<?php echo $image; ?>' height='100' width='180' style='border:3px double white;' /> </li> <?php endforeach; ?>
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘Retrieving Post ID For Comments?’ is closed to new replies.