<blockquote>Conditional/Check: IF comment author is the post author in comments.php</blockquote>
I want a snippet that will allow me to do a conditional statement whereby...
*this will be placed in comments.php
<?php if (comment_author = post_author) { ?>
//do something
<?php } ?>
Shoeb mirza answers:
<?php if ( $post = get_post($post_id) ) : ?>
<?php if ( $comment->user_id === $post->post_author ) :?>
//do something
<?php endif;?>
<?php endif;?>
Let me know if this is working
Also check this
<?php
global $post;
if( $comment->user_id === $post->post_author ) {
// do something
}
?>
pjeaje comments:
can you apply that code to the format in my question