Wordpress Plugin Appends Div before content
Posted
by
Tom
on Stack Overflow
See other posts from Stack Overflow
or by Tom
Published on 2011-01-12T15:25:01Z
Indexed on
2011/01/13
22:53 UTC
Read the original article
Hit count: 238
Wordpress
|wordpress-plugin
I'm trying to attach a div from a voting plugin before the content is generated on both the excerpt and the content of a post. Here's what I have in my plugin:
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);
}
Any ideas on what I'm doing wrong?
© Stack Overflow or respective owner