21,887
社区成员
发帖
与我相关
我的任务
分享
if ( $query->have_posts() ) :
$out = "<ul class='post-list'>";
while ( $query->have_posts() ) : $query->the_post();
$out .= "<li style='list-style:none;list-style-type:none;'> "."<a href='".get_permalink($post->ID)."'>".get_the_post_thumbnail()."
</a><a class='list_title' href='".get_permalink($post->ID)."'>" .get_the_title($post->ID). "</a>
<a class='excerpt' href='".get_permalink($post->ID)."'>
<span>".qtrans_use($q_config['language'],'<!--:zh-->更多<!--:--><!--:en-->More<!--:-->')."</span></a>
</li>";
endwhile;
$out .= "</ul>";
return $out;
else:
return "<p>No Post found.</p>";
endif;
<?php
$str = 'post id';
function qtrans_use($a, $b){
return $a.$b;
}
//if ( $query->have_posts() ) :
$out = "<ul class='post-list'>";
//while ( $query->have_posts() ) : $query->the_post();
$out .= "<li style='list-style:none;list-style-type:none;'> "."<a href='".$str."'>".$str."
</a><a class='list_title' href='".$str."'>" .$str. "</a>
<a class='excerpt' href='".$str."'>
<span>".qtrans_use($str,'<!--:zh-->更多<!--:--><!--:en-->More<!--:-->')."</span></a>
</li>";
//endwhile;
$out .= "</ul>";
echo $out;
//return $out;
//else:
// return "<p>No Post found.</p>";
//endif;
?>
但你並沒有給出qtrans_use的源碼。沒法判斷。