0
我正在试图在摘要和内容的帖子上生成内容之前,从投票插件附加div。这里是我的插件:Wordpress Plugin在内容之前附加div
if (get_option('ilt_onPage') == '1') {
function putILikeThis($content) {
if(!is_feed() && !is_single() && !in_category('3')) {
$likethisbox.= getILikeThis('put');
}
$content = $likethisbox . $content;
return $content;
}
add_filter('the_content', putILikeThis);
}
if (get_option('ilt_onPage') == '1') {
function putILikeThis1($excerpt) {
if(!is_feed() && !is_archive() && in_category('3')) {
$likethisbox.= getILikeThis('put');
}
$excerpt = $likethisbox . $excerpt;
return $excerpt;
}
add_filter('the_excerpt', putILikeThis1);
}
关于我在做什么的错误?
究竟发生了什么问题?有一件事情让我隐约怀疑:in_category('3')` - 应该是`in_category(3)`而不是? WordPress可能正在寻找类别_named_'3',而不是ID为3的类别。 – 2011-01-12 17:43:15