the_content and post_type problem
-
Trying to add something here. But NOT when the post type is static_block
I really cant figure out how to show something when the post is NOT static_block,
The theme i am using is inputting the_content other places and i dont want the image i am trying to add. like 5 places.
Anyone?
<?php function reklame_under($content) { if (is_singular() && $post->post_type != "static_block" ){ $reklame = ' <div style="width:468px; margin:5px auto;"> Trying to add something here. But NOT when the post type is static_block </div> <br/> '; return $content.$reklame; } else { return $content; } } add_filter('the_content', 'reklame_under', '100'); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘the_content and post_type problem’ is closed to new replies.