Title: [Plugin: YARPP
Last modified: August 19, 2016

---

# [Plugin: YARPP

 *  [nimbrung](https://wordpress.org/support/users/nimbrung/)
 * (@nimbrung)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-yarpp/)
 * I had installing YARPP on my site and adding the template code to my single.php
   file and getting this error when viewing the single post page
 * Fatal error: Call to a member function have_posts() on a non-object in
 * the code i had put is …
 * <?php if ($related_query->have_posts()):?>
    1.  <?php while ($related_query->have_posts()) : $related_query->the_post(); ?>
    2. 
    3.  <?php endwhile; ?>
 * <?php else: ?>
    <p>No related posts.</p> <?php endif; ?>
 * please any help 🙂

Viewing 1 replies (of 1 total)

 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-yarpp/#post-1204829)
 * As explained in the tutorial below, YARPP templates should not be copied into
   a theme.
 * [http://mitcho.com/blog/projects/yarpp-3-templates/](http://mitcho.com/blog/projects/yarpp-3-templates/)

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: YARPP’ is closed to new replies.

## Tags

 * [have_post](https://wordpress.org/support/topic-tag/have_post/)
 * [single.php](https://wordpress.org/support/topic-tag/single-php/)
 * [YARPP](https://wordpress.org/support/topic-tag/yarpp/)

 * 1 reply
 * 2 participants
 * Last reply from: [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-yarpp/#post-1204829)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
