如何显示类别描述?
问题描述:
我正在使用这个主题的WordPress的网站和即时通讯:Ermark Adora如何显示类别描述?
我想能够添加描述到我的类别。这是代码将在函数文件中的代码。 Here's the entire functions page (towards the end of the page)。
<li class="categ">
<h3> - '.$categ->name.' - </h3>';
if ($products_full=='true') {
$src['full_categ'] .= '<a href="#" class="less-products">'.__('view all','adora').'</a>';
$src['full_categ'] .= '</li>'
需要在oder中添加什么代码才能显示类别的描述?
答
我找到了答案:<h3> - '.$categ->name.' -</h3><p> '.$categ->description.' </p>';
答
请问Google在提出这样的问题之前。答案是在WP抄本:
http://codex.wordpress.org/Function_Reference/category_description
echo category_description($category_id);
+0
我确实尝试过这段代码,但描述仍然没有显示出来。 – ChrisBedoya 2012-08-13 22:28:07
[你尝试过什么(http://www.whathaveyoutried.com/)? – Matt 2012-08-13 20:37:02
我试过'category_description($ category_id);'但我不知道如何编写它才能工作。 – ChrisBedoya 2012-08-14 01:14:04