Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'the_content', 'filter_test'); // also tried the `wp` hook
- function filter_test($content){
- global $post;
- $post_slug = $post->post_name;
- if (get_post_type() == "post" && $post_slug != "allposts") {
- $content = preg_replace("/<strong>s+</strong>/",'',$content); // THIS LINE
- $content = preg_replace("/ |^s*$/",'',$content);
- return $content;
- }
- return $content;
- }
Add Comment
Please, Sign In to add comment