Viewing 1 replies (of 1 total)
  • Hey nvhcuong,

    thanks for reaching out!
    The thing is – when you write a post, the plugin generates the cache of its own to avoid making any unnecessary information retrieval requests. You can change this but it could cause a major performance issue.
    So, before I give you the code to change this, I would like to suggest you these two plugins to try out:
    1.) Advanced Random Posts
    2.) Spider Random Posts

    Or use this – the following code will cause related posts to be regenerated every time a reader will visit your blog. If you expect a lot of readers, we strongly advise you against this change!

    In file recommendations.php comment out parts of two rows and set value of both variables to false:

    $related_posts_query_result_cache_expiration = false; //(int) get_post_meta($post->ID, '_wp_rp_related_posts_query_result_cache_expiration', true);
    $related_posts_query_result_cache = false; //get_post_meta($post->ID, '_wp_rp_related_posts_query_result_cache_'.$options['max_related_posts'], true);

    Please be aware that this is a very risky action that might significantly affect the performance of your site and the server and that we cannot take any responsibility for this changes.

    In any case, hope it goes well. And do let us know, we’re eager to hear about the results (if you choose to execute it).

    Take care & have a nice day!

    Best,
    Petra

Viewing 1 replies (of 1 total)
  • The topic ‘Random related posts’ is closed to new replies.