WordPress title as keywords (tags) with excluded stop words

Here is your updated function solving your 2 problems :

// Post title as keywords, excluded stop words
function title_as_keywords( $word )
{
    $blacklist = array('this', 'about', 'that', 'them'); // Excluded words ...
    $whitelist = array('one', 'man', 'boy'/*etc..*/); // Whitelisted words ...
    if ( (!in_array( $word, $blacklist ) && strlen( $word ) > 3 ) || in_array($word, $whitelist)) { //Exclude words with less than 4 characters
          $word_with_comma="" .$word. ', '; // Separate words with comma
          return $word_with_comma;
      }
    else { return ''; } // Return nothing for black list words or words with less than 4 characters

}
$title = get_the_title( $post->post_parent ); // Get title
$parts = explode( ' ', $title );
$str="";
foreach ($parts as $word) {
    $str.= title_as_keywords($word);
}
$str = substr($str, 0,-2);
echo $str;

Hope it’ll help 🙂