Warning: implode() [function.implode]: Invalid arguments passed in /home/tony45
-
Hi,
I am getting this warning message at the top of my WP site Page ” Warning: implode() [function.implode]: Invalid arguments passed in /home/tony452/public_html/wp-content/themes/entrepreneur-2right/includes/custom_functions/seo.php on line 103″ Can anyone tell me how to fix this? I can’t find the error.Thank you.
Tony S.Here is Code : ‘function tpk_seo_keywords () {
global $posts, $wpdb;
if ( is_single() ) {
$page_keywords = get_the_tag_list(”, ‘ ‘, ”);
}
elseif (is_home() || is_category() || is_tag() || is_date() || is_search() ) {
foreach ($posts as $post_values) {
$array_id[] = $post_values->ID;
}
$list_id = implode(‘”,”‘, $array_id);
$sql_query = ‘SELECT DISTINCT name ‘.
‘FROM ‘.$wpdb->term_relationships.’ AS rel,’.
$wpdb->term_taxonomy.’ AS tax,’.
$wpdb->terms.’ AS ter ‘.
‘WHERE tax. taxonomy = “post_tag” ‘.
‘AND rel.object_id IN (“‘. $list_id.'”) ‘.
‘AND rel.term_taxonomy_id = tax.term_taxonomy_id ‘.
‘AND tax.term_id = ter.term_id ORDER BY tax.count’;
$results = $wpdb->get_results($sql_query);
$page_keywords = implode(‘ ‘, $results);
}
if ($page_keywords != ”) {
$page_keywords = htmlspecialchars(stripslashes(strip_tags(str_replace(“\n”, ”, $page_keywords))));
echo ‘<meta name=”keywords” content=”‘.$page_keywords.'”>’.”\n”;’
- The topic ‘Warning: implode() [function.implode]: Invalid arguments passed in /home/tony45’ is closed to new replies.