WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] YARPP not displaying correctly on multilingual site (3 posts)

  1. Soccerwidow
    Member
    Posted 1 year ago #

    I have a multilingual site and the related posts only display properly for my primary language (English), but not the secondary language (German).

    I tried clearing the YARPP cash and it worked well, but only for one instance and after refreshing the site just one time the related posts are messed up again. On some articles there are even double posts displayed.

    So everything is fine for first language, but not for the second.

    I'm running WPML and HyperCache, so there may be a conflict with these plugins, but I would hate to have to disable any of them.

    Any help?

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

  2. Soccerwidow
    Member
    Posted 1 year ago #

    I keep thinking what can be done... cache flushing works, but only for the first 5 minutes, and needs to be reset manually.

    Would it be possible to add somewhere following code?

    <?php
    if ($_SERVER['SERVER_NAME'] == 'www.main_language.com') {
    	echo "";
    } else {
    	$yarpp_cache->flush();
    }
    ?>

    It would not execute anything if it's the main language, and flush the cache each time a page is loaded in the other language.

    Would it be a good idea to add this code to single.php, probably in the header?

    Sorry should this be rubbish, I'm not a programmer...

  3. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 1 year ago #

    Unfortunately there are known incompatibilities with WPML. I've reached out to the WPML team on numerous occasions and they have not been responsive. :(

    If you want to completely kill the caching mechanism, try adding define('YARPP_CACHE_TYPE', 'bypass'); to your wp-config file. Of course, this is not recommended... it means that all results will be recomputed on every page load, which may be a problem for your server. Maybe you can give it a try on a test server, though.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic