【发布时间】:2012-06-28 16:13:46
【问题描述】:
我想在侧边栏下面的代码中显示当前类别名称,但我不能。谁能帮帮我?
谢谢。
<?php
$weather_city = the_category_name();
if ($weather_city)
echo do_shortcode('[forecast location="' . $weather_city . ', Greece" caption="" measurement="C" todaylabel="Σήμερα" datelabel="%%weekday%%" highlow="%%high%%° / %%low%%°" numdays="4" iconset="Incredible" class="css_table_class"]'); ?>
【问题讨论】:
-
您似乎缺少
if的一些括号 -
如果只有一行代码则不需要... :)
标签: php wordpress categories shortcode