Voting Plugin Fliter for Posting to Content
-
I’ve got a plugin that gives users the ability to vote “yes or no” on a post. I’m trying to automatically append the voting DIV to the Content and Excerpt areas.
I’ve got this code running to automatically display the voting 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); }
However, when I run this script it either randomly displays the DIV, doesn’t display the div but rather the text is appended to the excerpt (rather than in its own container, its with everything else) or it does not follow the In_category and displays it on all/random posts.
Can anyone see the mistake I am making? Its been driving me mad for a few hours now!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Voting Plugin Fliter for Posting to Content’ is closed to new replies.