0
我試圖傳遞函數參數,並打印在WordPress插件輸出我沒能在這裏傳遞的參數是我的代碼如何通過參數的WordPress插件
global $postidd;
$postidd=$_REQUEST["postid"];
function getcontent($postidd)
{
// do something with the args
if($postidd)
{
$args12 = array(
'p'=>15,
'post_type' => 'offers',
'orderby' => 'title',
'order' => 'ASC'
);
$the_query12 = new WP_Query($args12);
if ($the_query12->have_posts()) : while ($the_query12->have_posts()) : $the_query12->the_post();
return $postidd;
endwhile;endif;
return $postidd;
}
}
您需要解釋更多的問題。你在哪裏調用這個函數? –