Search and Replace in Web Files

This handy function will search and replace all instances of a search term in every file with the PHP extension, across all directories and subdirectories. Upload the file to your root directory and run it. function callbackDir($dir){ $searchString = "searchforthis"; $newValue = "replacewiththis"; // directory, [...]

2011-03-02T23:14:27+00:00June 9th, 2010|PHP Snippets|0 Comments

Remove Trackbacks and Pingbacks from Comments

Unfortunately, the default Recent Comments widget also includes trackbacks and pingbacks and the sight ain’t so lovely thus I had to add this hack to weed out the trackbacks and pingbacks. Open your theme's functions.php file and add the following code if ( !$comments = [...]

2011-03-02T23:20:07+00:00June 7th, 2010|PHP Snippets|2 Comments