• Is it posible to add the vote system to author.php page?
    I’ve made a custom loop for getting author information and I would like to add a rating there.

    	<?php
    	remove_all_filters('posts_orderby');
    
    	$args = array(
    
    		'orderby' => 'rand',
    		'posts_per_page' => 5,
    		'exclude' => array( 1 )
    
    	);
    
    	$user_query = new WP_User_Query( $args);
    	
    	shuffle($user_query);?>
    
    		<?php if ( ! empty( $user_query->results ) ) {
    			foreach ( $user_query->results as $author ) {?>
    
    				<div class="snowplanner">																			
    				
                        <?php $image = get_field('user_photo', "user_{$author->ID}" ); $image_url = $image['sizes']['thumb-s']; echo $image_url;?>
                        <h3><?php echo $author->first_name; ?></h3>
                        <?php the_field('user_biografie', "user_{$author->ID}");?>                                        
                        <?php echo get_author_posts_url($author->ID); ?>
    					
                        <?php echo do_shortcode('[rating-system-posts]')?>
                        
                        
    				</div>	
                    
            <?php }} ?>	

    Seems to work at home, but I think its rating the home page and not the user

    • This topic was modified 7 years, 7 months ago by tatof.
  • The topic ‘Author page Votes’ is closed to new replies.