WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] [Plugin: Yet Another Related Posts Plugin]: set of related posts repeated twice (5 posts)

  1. jayjayc
    Member
    Posted 4 years ago #

    Thank you so much for sharing this awesome plugin, Mitcho...God bless you!

    I've recently installed it at my website: http://www.jaycjayc.com/ and noticed that it works fine except that the set of related posts for a single post is repeated twice.

    How can this be rectified? If it involves editing the theme files, please be specific in layman terms as I'm not technically competent.

    Thanks in advance.

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

  2. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 4 years ago #

    @jaycjayc Hmm... how odd. Sometimes this happens due to the use of another plugin, like WordPress Multilingual (WPML) or something else which adds custom handling to post revisions. Are you using something of that nature?

    If you're comfortable going into your database, you may also benefit from clearing YARPP's cache once. You can do this by emptying the wp_yarpp_related_cache table.

  3. jayjayc
    Member
    Posted 4 years ago #

    Thanks so much for your appreciated response, Mitcho!

    I'm not using WPML or anything of that nature.
    Also, your suggestion at para 2 regarding clearing YARPP's cache is totally Greek to me...neither know where is my database nor where to locate the cache, being a non-technical person.

    Anyway, I've experimented with editing the single.php theme file by deleting the following codes and it did remove the 2nd set of related posts just above the comment box:

    <?php if(function_exists("related_posts")) { ?>
    						<h3>Related Posts</h3>
    						<ul>
    							<?php related_posts(); ?>
    						</ul>
    						<?php } ?>

    Could you please advise whether this is the correct move (i.e remove the whole lot of codes as above) or should there be just some minor customization instead and if so, how?

    Meanwhile I've added back the codes as I'm unsure whether removing them will affect other areas in my website since I'm lacking in technical knowledge. A lot done is through trial and error.

    Any help will be much appreciated. Thanks and God bless!

  4. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 4 years ago #

    @jayjayc Oh, I see. You were seeing the list twice. Sorry to confuse you.

    Yes, you're welcome to remove that code from single.php. Alternatively, you can go to the YARPP settings and turn off the "automatically display" option under the "web" settings section.

  5. jayjayc
    Member
    Posted 4 years ago #

    Thanks so much for responding, Mitcho!

    As advised, I turned off the "automatically display" option, as well as remove some codes i.e the h3 and ul tags from the single.php

    Voila! Not only the second list of related posts had disappeared, even the validation errors by W3C no longer exist!

    Thanks again and God bless!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic