Can you help me with getting the attached image in a custom template via php similar to
echo get_comment_meta( $comment->comment_ID, 'custom_field', true );
TIA
]]>Screenshot: https://i.stack.imgur.com/MoFWo.jpg
I thought I could use a wp_comment_reply filter for this, but I can’t get it to work. Does anyone have an idea?
This is what I tried:
function wporg_more_comments( $content ) {
echo '123';
return $content;
}
add_filter( 'wp_comment_reply', 'wporg_more_comments', 5, 1 );
]]>So basically I need to get each comment’s $overall value, for every single comment for that particular post.
Would I use a foreach statement? Like, foreach $post_id get $overall foreach comment…
I’m looking for some guidance on the best way to approach this.
]]>I want to show the sum of all the current published comment meta for the rating of a post if possible.
(i.e. add up all the values / # of individual ratings) and output that number along with the post title…
$args = array( 'post_type' => 'Product' );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
the_title();
// get sum of comment meta for rating / count of all comments
]]>