• Hello,
    as my previous question is definitively closed, here comes a new one πŸ™‚

    It’s a suggestion: giving the opportunity to add stopwords to the analysis of related posts. My site is about illustration so “illustration” “illustre” and these kind of terms are not very useful for related posts… but the plugin take them in count.
    If I make a post about an illustrator from the USA, I would like to see related other posts about “USA” and not “illustrator” (as majoritiy of the posts are about illustrators).

    https://ww.wp.xz.cn/plugins/contextual-related-posts/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Ajay

    (@ajay)

    Li-An, I’ll add a filter to the next version of the plugin on what exactly is compared. You could use that to write your function to exclude / replace out any of the stop words as you suggest above.

    $stuff on line 385 holds the content that is matched. You would be able to do a str_replace on this to exclude out the stop words.

    Something like:

    $stopwords = array("illustrate", "illustration");
    $stuff = str_replace($stuff, "", $stuff);

    Thread Starter Li-An

    (@li-an)

    Thanks for the news. I will wait for next version, it’s not urgent for me.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘stopwords ?’ is closed to new replies.