我正在使用Classipress themewordpress,并且我正在尝试将我的特色广告粘贴到类别中。
我发现一个返回此错误的代码:
Warning: in_array() expects parameter 2 to be array, string given in loop-ad_listing.php on line 26
Run Code Online (Sandbox Code Playgroud)
要使用顶部粘性代码,我必须编辑两个页面并插入两个代码,然后我将发布错误部分:
第一的:loop-ad_listing.php
global $postisfeatured;
global $featurePostArray;
if ($postisfeatured == "1")
array_push($featurePostArray, $post->ID);
if (in_array($post, "ID", $featurePostArray) && $postisfeatured != "1")
echo '<div class="hide">';
Run Code Online (Sandbox Code Playgroud)
if ($postisfeatured != "1") {
appthemes_after_endwhile();
$postisfeatured = "";
}
Run Code Online (Sandbox Code Playgroud)
那行:if (in_array($post,"ID",$featurePostArray) && $postisfeatured != "1") {
是错误。