0
我目前有一個奇怪的問題。其他目錄沒有相關記錄當有1職位
我剛剛在我的WordPRess博客上發佈了我的第一篇博文,出於某種原因,分類列表未顯示。
我發佈了另一個帖子來測試它,然後這兩個類別開始顯示這兩個帖子。所以我認爲奇蹟發生了。
因此,我刪除了測試帖子(回到一個帖子),然後再次開始問題。沒有分類列表。
我很難過,因爲代碼似乎是合理的,爲什麼會發布另一篇文章使類別列表工作?
您可以點擊[這裏] {http://www.noellesnotes.com}訪問該網站並查看我遇到的問題。
我想我找到了問題。它在這個代碼如下:
<?php
/* translators: used between list items, there is a space after the comma */
$category_list = get_the_category_list(__(', ', 'ribbons-and-clouds'));
/* translators: used between list items, there is a space after the comma */
$tag_list = get_the_tag_list('', __(', ', 'ribbons-and-clouds'));
if (! ribbons_and_clouds_categorized_blog()) {
// This blog only has 1 category so we just need to worry about tags in the meta text
if ('' != $tag_list) {
$meta_text = __('This entry was tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'ribbons-and-clouds');
} else {
$meta_text = __('Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'ribbons-and-clouds');
}
} else {
// But this blog has loads of categories so we should probably display them here
if ('' != $tag_list) {
$meta_text = __('This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'ribbons-and-clouds');
} else {
$meta_text = __('This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'ribbons-and-clouds');
}
} // end check for categories on this blog
printf(
$meta_text,
$category_list,
$tag_list,
get_permalink(),
the_title_attribute('echo=0')
);
?>
看看如果其中一個if語句告訴它不列出的類別,如果只有一個?
有誰知道如何編輯此代碼以使類別顯示不管是什麼?
是的,這絕對是一個主題問題,因爲它不會發生在其他主題,但我只是不知道是什麼可能導致這個問題... – nellygrl