我最近買了一個WordPress主題,做了一個花哨的畫廊顯示的照片,它已經在主頁上得到以下錯誤。在WordPress主題中由零錯誤劃分
警告:在/home/content/21/4913121/html/stsudios/wp-content/themes/dt-chocolate/front-gal.php被零除在線路36上
警告:被零除在線48上的/home/content/21/4913121/html/stsudios/wp-content/themes/dt-chocolate/front-gal.php
以下是通過第50行的代碼 - /**/
的行是麻煩的人。任何幫助表示讚賞!
<?php
global $postgallery;
$show = $postgallery->get_post_option('show');
$arr = $postgallery->get_post_option('show_'.$show);
$arr = explode(",", $arr);
$arr = (array)$arr;
//$myterms = get_terms('dt_gallery_cat');
$myterms = apply_filters('taxonomy-images-get-terms', '', array('taxonomy'=> 'dt_gallery_cat'));
$images = array();
global $term, $h;
foreach ($myterms as $term)
{
if ($show == "all")
{
}
elseif ($show == "only")
{
if (!in_array($term->term_id, $arr))
continue;
}
elseif ($show == "except")
{
if (in_array($term->term_id, $arr))
continue;
}
$term->pic = wp_get_attachment_image_src($term->image_id, 'full');
$k = $term->pic[1]/$term->pic[2];
/**/$term->pic = $term->pic[0];/**/
$size = taxonomy_get_size($term->term_id);
if ($size == "s")
$w = 220;
if ($size == "m")
$w = 460;
if ($size == "l")
$w = 700;
/**/$h = ceil($w/$k);/**/
$term->pic = get_template_directory_uri().'/thumb.php?src='.$term->pic.'&w='.$w.'&h='.$h.'&zc=1';
要求退款。 WordPress的主題花錢?! –
預設'$ w'爲預設的「預設」大小,因爲如果未設定「$ size」,則不會設定「$ w」造成部分問題。 – stealthyninja
Themeforest主題很可怕:「將CHMOD 777設置爲文件夾」your_site/wp-content/themes/dt-chocolate/cache「2)必須創建文件夾」your_site/wp-content/uploads「,並將CHMOD設置爲777」是的,對。你好,黑客,請破解我。 – markratledge