• Resolved ibrahimyavuznet

    (@ibrahimyavuznet)


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

    I want to show the rating given in the comment in this section:
    https://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>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Show the rating part in recent comments’ is closed to new replies.