Yet Another Related Posts Plugin (YARPP)
[resolved] Filtering related posts by language (using Polylang) (6 posts)

  1. Alberteddu
    Posted 3 years ago #


    I'm using YARPP to display a list of related posts.
    Is it possible to filter posts by language, only showing posts in the current language?

    I'm not sure if this has already been asked, it seems I can't search in the support forums of the plugin.

    Thank you!


  2. Chouby
    Posted 3 years ago #

  3. Alberteddu
    Posted 3 years ago #

    Thanks Chouby.

    I'm supposing this enables languages as taxonomies, so I can later exclude languages using the function "yarpp_related". Is this correct?

    'exclude' => array(<id of language>),

    Thanks for your answer.

  4. Chouby
    Posted 3 years ago #

    I am not familiar with YARPP as I don't use it. For what I have understood, this will allow to require the language to be common in the "relatedness" options. So far, I have no feedback whether it works or not.

    Maybe it can work as you want too. I don't know.

    And yes the language is a taxonomy in Polylang (but YARPP does not consider all taxonomies by default, the reason for the small manipulation suggested in the link above).

  5. Alberteddu
    Posted 3 years ago #

    Oh, thanks! That did it.

    If someone has trouble with this, in the YARPP settings page you have to enable "relatedness" options via the "Screen options" slider, then you can tell YARPP to select related posts that have at least one language in common with the one being displayed.

    Thanks again.

  6. mitcho (Michael Yoshitaka Erlewine)
    Plugin Author

    Posted 3 years ago #

    Great! Glad you found that option. Very cool that you can use YARPP in this way. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yet Another Related Posts Plugin (YARPP)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic