Questions tagged «genesis-theme-framework»

1
在类别页面上显示当前类别标题
在类别模板中使用以下代码,但不显示我所在的当前类别页面,而是显示第一篇文章的第一个类别。例如,在“食品类别”页面上,应显示“食品”,而应显示“甜点”,因为第一篇文章的类别是甜点。这是网站http://theveganproject.ca/wp/category/food/ add_action ( 'genesis_before_content', 'sk_show_category_name' ); function sk_show_category_name() { $category = get_the_category(); if (is_category()) { echo '<div id="cat-name">' . $category[0]->cat_name . '</div>'; } }

2
未定义的偏移量:0 in> […] /wp-includes/capabilities.php,行1067
嘿,我在本地主机设置中收到此错误消息,但仅在启用Genesis Framework的情况下;WordPress 21可以正常工作。当我要创建新帖子时会发生这种情况。如果我刷新页面,该错误将重复出现,但帖子本身会创建,并且一切似乎都正常。 有谁知道是什么原因造成的? Notice: Undefined offset: 0 in /var/www/secret/htdocs/wp-includes/capabilities.php on line 1067 Notice: Undefined offset: 0 in /var/www/secret/htdocs/wp-includes/capabilities.php on line 1067 Warning: Cannot modify header information - headers already sent by (output started at /var/www/secret/htdocs/wp-includes/capabilities.php:1067) in /var/www/secret/htdocs/wp-includes/pluggable.php on line 876 这是一个新安装的未修改的Genesis Framework。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.