Confusing question. It sounds like you mean the plugin is checking for <!-- code -->
in the raw post content and using this as a trigger to indicate not to add the ad code.
I think you need to identify the filter that the plugin is using to add the ad code so you can find the filter priority, and make sure you add your own filter before that runs. You could try this, I am using 0
priority here so it hopefully runs before anything else anyway:
add_filter('the_content','insert_ad_removal_code',0);
function insert_ad_removal_code($content) {
// do not need !is_admin with these conditions
if ( is_single() && in_category( '1293' ) ) {
// maybe not neeed, but check if already added
if (!strstr($content,'<!-- code -->')) {
// add the code that will prevent the add
$content="<!-- code -->".$content;
}
}
return $content;
}
I think you are wanting to remove all ads from posts in category 1293
this way, but it is unclear maybe you want it the other way round.