Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Aperture

macrumors 68000
Original poster
Mar 19, 2006
1,876
0
PA
Hi Everyone, I have a setup that will allow me to post to my Wordpress blog via phone. When the phone call is transcribed and posted to my Wordpress blog, it has a signature that says "Powered by Jott."

Is there any way that I can configure Wordpress to automatically look for that keyword and exclude it from the post?

Thanks
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
I'd need more info. You might be able to extract that snippet when the post is created, but that may mean editing some code that's a little deeper in WordPress. Are you wanting to delete out that sig completely, or just hide it visually, or something else?

You could do a string replace with PHP like so,
PHP:
$thePostText = str_replace('Powered by Jott.', '', $thePostText);
This would be wherever in the code the post text is being processed. I haven't used WordPress so not sure how to help there.
 

wesg

macrumors regular
Jan 2, 2008
211
0
Toronto, ON
What you're looking to do can be easily done with a Wordpress plugin. If you go to http://codex.wordpress.org/Plugin_API#Example and go down to Create a Filter Function you can create your own.

In fact, here is an entire PHP file that should do the job. Just save this as removejott.php or similar in your plugin folder and give it a try.

PHP:
<?php
/*
Plugin Name: Remove Jott
Plugin URI: https://www.macrumors.com
Description: Remove the Jott signature
Author: Someone special
Version: 1.0
Author URI: https://www.macrumors.com
*/

function remove_jott($arg) {
	$arg = str_replace('Powered by Jott', '', $arg);
	
	return $arg;
}

add_filter('the_content', 'remove_jott');
?>
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.