Title: Not working
Last modified: August 30, 2016

---

# Not working

 *  [AdowTatep](https://wordpress.org/support/users/adowtatep/)
 * (@adowtatep)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/not-working-1425/)
 * Hi guys. I’m new to YARRP and i’m trying to make it work with my own theme. Well,
   i made the template but it seems it’s not working
 *     ```
       <?php if (have_posts()):?>
         <div id="nav-posts" class="owl-carousel owl-theme">
           <?php while (have_posts()) : the_post();
                 $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'small' );
                 $url = $thumb['0'];
           ?>
       	<div class="item hoverable z-depth-1" style="background: url(<?php echo $url; ?>) center; background-size: cover;"><a href="<?php the_permalink() ?>" rel="bookmark"><h5><?php the_title(); ?></h5></a><!-- (<?php the_score(); ?>)--></div>
       	<?php endwhile; ?>
   
       <?php else:?>
   
       <p><i class="material-icons small" style="vertical-align: middle;">mood_bad</i><span style="vertical-align: middle;"> We couldn't find any related :( Have a random one:</span></p>
   
       <?php
             $args = array(
               'orderby' => 'rand',
               'showposts' => '10'
             );
             $query = new WP_Query( $args );
   
             while($query->have_posts()){
   
               $query->the_post();
   
               $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'small' );
               $url = $thumb['0'];
   
             ?>
   
               <div id="nav-posts" class="owl-carousel owl-theme">
               <div class="item hoverable z-depth-1" style="background: url(<?php echo $url; ?>) center; background-size: cover;"><a href="<?php the_permalink() ?>" rel="bookmark"><h5><?php the_title(); ?></h5></a><!-- (<?php the_score(); ?>)--></div>
   
         <?php 
   
             }
       ?>
       <?php endif; ?>
       </div>
       ```
   
 * The related posts never appear, and only one random post is shown, my precision
   number is 0 on the plugin settings and i checked to display all results. The 
   template appear and works well, but the related posts doesn’t show, instead, 
   the “didn’t work” message appear and only one random post show up.
 * [https://wordpress.org/plugins/yet-another-related-posts-plugin/](https://wordpress.org/plugins/yet-another-related-posts-plugin/)

The topic ‘Not working’ is closed to new replies.

 * ![](https://ps.w.org/yet-another-related-posts-plugin/assets/icon-256x256.png?
   rev=2549977)
 * [YARPP - Yet Another Related Posts Plugin](https://wordpress.org/plugins/yet-another-related-posts-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yet-another-related-posts-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/reviews/)

## Tags

 * [finding](https://wordpress.org/support/topic-tag/finding/)
 * [not](https://wordpress.org/support/topic-tag/not/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)
 * [showing](https://wordpress.org/support/topic-tag/showing/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * 0 replies
 * 1 participant
 * Last reply from: [AdowTatep](https://wordpress.org/support/users/adowtatep/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/not-working-1425/)
 * Status: not resolved