0
我在Wordpress 3.5.2中有一個代碼並且工作正常,但是在3.6中顯示了像文本(我也安裝了Exec-PHP)。也許是因爲通過$ get_cats或類似的?重要的是,我正在與XAMPP合作。Wordpress 3.6中的錯誤php
<?php
$get_cats = wp_list_categories('echo=0&title_li=&depth=1&sort_column=name&show_count=0&hide_empty=0&show_option_all&child_of=0&exclude_tree=1&exclude=1,762,899,951');
$cat_array = explode('</li>',$get_cats);
$results_total = count($cat_array);
$cats_per_list = ceil($results_total/5);
$list_number = 1;
$result_number = 0;
?>
<ul id="category_footer_post" class="list-icon circle-no list-icon-color-dark list-icon-arrow" id="cat-col-<?php echo $list_number; ?>">
<?php
foreach($cat_array as $category) {
$result_number++;
if($result_number % $cats_per_list == 0) {
$list_number++;
echo $category.'</li>
</ul>
<ul class="category_footer_post list-icon circle-no list-icon-color-dark list-icon-arrow" id="cat-col-'.$list_number.'">';
}
else {
echo $category.'</li>';
}
} ?>
</ul>