Forums

[Plugin: YARPP (2 posts)

  1. nimbrung
    Member
    Posted 2 years ago #

    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()):?>

      <?php while ($related_query->have_posts()) : $related_query->the_post(); ?>

    1. " rel="bookmark"><?php the_title(); ?>
    2. <?php endwhile; ?>

    <?php else: ?>
    <p>No related posts.</p>
    <?php endif; ?>

    please any help :)

  2. As explained in the tutorial below, YARPP templates should not be copied into a theme.

    http://mitcho.com/blog/projects/yarpp-3-templates/

Topic Closed

This topic has been closed to new replies.

About this Topic