# Built-in search engines of WordPress, Drupal and other content management systems are good, but not as good as Google. Here is a simple way to create a Google search form that will return results only from your site:
<form name="google-search" method="get" action="http://www.google.com/search">
<input type="hidden" name="sitesearch" value="http://yourdomain.com/" />
<input name="q" type="text" />
<input type="submit" name="sa" value="Google" />
</form>
which will look like this:
This form does redirect your visitors to Google, but the results returned are only from your site, so there is nothing to worry about. And with Googling indexing blogs almost instantly, there are actually very little drawbacks from using this approach for site search.
# By default the Twitter Tools plugin uses URLs such as http://example.com/p=123 in your tweets. However, if you are using one of the URL shortener plugins (that make use of the standard get_shortlink() function), chances are that you would rather include the URL generated by that plugin. To do that, simply add this to your theme’s functions.php:
add_filter('tweet_blog_post_url', 'get_shortlink_for_twitter');
function get_shortlink_for_twitter($url) {
return wp_get_shortlink(url_to_postid($url));
}
# After upgrading WordPress to a new version, you might need to clear the APC opcode cache. Here is a simple script that you can store in the root of your website, for example, clearapc.php:
if (function_exists('apc_clear_cache') && $_GET['pass'] == 'secret') {
if (apc_clear_cache() && apc_clear_cache('user'))
print 'All Clear!';
else
print 'Clearing Failed!';
print '<pre>';
print_r(apc_cache_info());
print '</pre>';
} else {
print 'Authenticate, please!';
}
Then call the script via http://example.com/clearapc.php?pass=secret
Instead of using ?pass=secret, you might well call the filename something that is hard to guess: clearapc93920.php
# Here is a quick way to clear APC opcode cache with a single click within your WordPress dashboard Read more »
# Currently WordPress doesn’t offer an easy way for plugins which are not hosted on wordpress.org to use its built-in automatic update feature.
Fortunately, I have found a quick and simple way to add this functionality to any plugin and allow plugin authors to take a complete control over when and how the updates are released. Read more »
# Quick Reply Templates is a really useful WordPress plugin by Paul William that allows you to have a predefined comment reply template, such as <a href="#commend-id">@Name</a>, that will be filled out automatically when you reply to a comment within your WordPress Dashboard or Edit Comments page. Read more »
# After upgrading to 2.8-beeding-edge I got the following error:
Fatal error: Call to undefined method WordPress_Module::_weak_escape()
in ../wp-includes/wp-db.php on line 473
Disabling Redirection plugin solved the problem. Could it be that Redirection also defines _weak_escape() or escape()? Server ir running PHP 5.2.6.
# With the latest design update, I have stripped away most of the clutter in the form of secondary content. It also included removing most of the ads, just because 400 visitors a day is still to few to get more than a single click per day.
I decided to install Ozh’s Who Sees Ads plugin to make ads visible only to visitors coming from search engines. The problem, however, is that it shows ads only on the landing page and not on all pages that the user visits. Read more »