As I am not very good with explaining things, I want to start with the code below:
public function meta ( ) {
$keywords_arr = $this->keywords();
/*
echo "<pre>"; print_r($keywords_arr);die;
gives following output:
Array
(
[0] => f
[1] => Business
[2] => AP Online Top Business Short Headlines
[3] => AP Online
)
*/
$focuskw = is_array($keywords_arr[0]) ? $keywords_arr[0] : null;
return array(
'_yoast_wpseo_focuskw' => $focuskw
);
}
So now my question, is there any way i can eliminate the useless items from keyword array.
So that I can get some meaningful word that I can set as focused keyword.
In this case the first item "f" (but it can be any item) and i cannot set "F" as focused keyword.
So How to eliminate such meaningless items from array without adding complexity(i.e probably not running loop). I am not sure if it is possible.
I hope I am a bit more clear now.
Thank you