0
在我的自定義WordPress主題我archives.php文件,我有以下代碼:添加類別標題到WordPress主題文件
<div class="page-title">
<?php
if (is_day()) :
printf(__('Daily Archives: %s', 'sturd'), '<span>' . get_the_date() . '</span>');
elseif (is_month()) :
printf(__('Monthly Archives: %s', 'sturd'), '<span>' . get_the_date(_x('F Y', 'monthly archives date format', 'sturd')) . '</span>');
elseif (is_year()) :
printf(__('Yearly Archives: %s', 'sturd'), '<span>' . get_the_date(_x('Y', 'yearly archives date format', 'sturd')) . '</span>');
else :
_e('Archives', 'sturd');
endif;
?>
</div>
我希望這是另一種說法,這樣,如果這是一個分類頁面,它只顯示頁面標題div中的類別標題,而不僅僅顯示Archives(就像它當前所做的那樣)。
我希望這張貼在正確的部分。
在此先感謝。
山姆
未來,您可能更願意在[WordPress的答案](http://wordpress.stackexchange.com)上發佈WP相關問題。 – yelly