View Single Post
Old 03-25-2012, 04:26 PM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Quote:
Originally Posted by CyberSEO View Post
You are a CyberSEO customer. Am I right? If so, just go to CyberSEO->Tools and find the "PHP Code <?php .. ?>" box. You can use it to modify every existing post (title, content, excerpt). For example, if you want to replace "word1" to "word2" in every post and its excerpt, simple put the following code into the "PHP Code <?php .. ?>" box and click the "Apply" button:

Code:
$post->post_content = str_replace('word1', 'word2', $post->post_content);
$post->post_excerpt = str_replace('word1', 'word2', $post->post_excerpt);
If you want, say, remove "bad_word" for the post tittle, the code will be as simple as this:

Code:
$post->post_title = str_replace('bad_word', '', $post->post_title);
etc
that doesnt revmoe it from the db though, its just being replaced via the post object.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote