WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Alberteddu
    Member
    Posted 1 year ago #

    Hi,

    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!

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

  2. Chouby
    Member
    Posted 1 year ago #

  3. Alberteddu
    Member
    Posted 1 year 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?

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

    Thanks for your answer.

  4. Chouby
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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)
    Member
    Plugin Author

    Posted 1 year 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

About this Topic