Notifications
Clear all

Show the rating part in recent comments

2 Posts
2 Users
0 Reactions
877 Views
(@ibrahimyavuznet)
New Member
Joined: 5 years ago
Posts: 1
Topic starter  

Hi,
in a design that I work on localhost, I have the last comments section (home page):
http://prntscr.com/ol1d81

I want to show the rating given in the comment in this section:
http://prntscr.com/ol1dib

What code should I write between these two divs?

<div class="star-rating inline-block ptop">

</div>

I tried the following code but it doesn’t work.

<?php echo do_shortcode('[wpdrating]'); ?>

My all code:

<div class="column-half">
<div class="box">
<div class="box-title">Son Değerlendirmeler</div>

			

				
<?php $comments = get_comments('status=approve&number=3'); ?> 
<?php foreach ($comments as $comment) { ?> 
				<div class="box-row">
				<div class="flex">
					<div class="author">
<div><img class="icon-small" src="<?php echo get_avatar_url($user->ID,array('width'=>'30','height'=>'30')); ?>" /> <strong><?php comment_author(); ?></strong> tarafından <a href="<?php echo get_permalink($yorum->comment_post_ID ); ?>" class="underline"><?php echo get_the_title($comment->comment_post_ID); ?></a> için 
					</div></div>

					<div class="star-rating inline-block ptop">

					</div>
				</div>

				<p class="dark-gray no-mbot index-review"><?php echo wp_html_excerpt( $comment->comment_content, 90 ); ?>... <a href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID() ?>" class="red">devamı</a> <?php comment_date('M j, Y'); ?></p>
			</div>
    <?php
    }
?>
		</div>
	</div>

   
Quote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6193

   
ReplyQuote
Share:
Scroll to top