I'm using Classipress theme for wordpress, and I'm trying to sticky my featured ads on the on in categories .
I found a code that is return this error:
Warning: in_array() expects parameter 2 to be array, string given in loop-ad_listing.php on line 26
To use the sticky on top code, I had to edit two pages and insert two codes and I'll post the error part:
First: loop-ad_listing.php
Code1:
global $postisfeatured;
global $featurePostArray;
if ($postisfeatured == "1")
array_push($featurePostArray, $post->ID);
if (in_array($post, "ID", $featurePostArray) && $postisfeatured != "1")
echo '<div class="hide">';
Code2:
if ($postisfeatured != "1") {
appthemes_after_endwhile();
$postisfeatured = "";
}
That line: if (in_array($post,"ID",$featurePostArray) && $postisfeatured != "1") {
is the error.