Blogging, SEO, web trends, google keywords and other geeky stuff.

How to Auto-update Your Copyright in WordPress

Posted: January 4th, 2010 | Author: Agitationist | Filed under: blogging, tools, wordpress | Tags: , , , , | 3 Comments »

(Republished from last year, because you need it.)


So it’s a new year…have you forgotten anything?

Here’s a hint:

Ever see a site with a copyright statement 6 months out of date? Even big-shot corporate blogs make this mistake. But on a young, growing blog, it looks particularly bad.

Or perhaps you don’t have a copyright statement at all? Tsk tsk.

Why don’t we automate this, so we’ll never, ever have to think about it again? Here’s how to do it in WordPress:

  1. Log in to WordPress, and go to Theme Editor.
  2. Choose “footer.php”.
  3. Delete your current copyright statement (if it exists), and insert the following code:&copy; 2008 – <?php echo date(Y); ?>…replacing “2008″ with the date you started your blog.
  4. If you wish, put your name adjacent to the copyright, being sure not to disturb the php date tag. See mine below for an example.
  5. Done.

Happy New Year! Anyone got a good detox recipe?

Bookmark and Share

How to: Display AdSense Ads to Search Engines Visitors Only

Posted: November 27th, 2009 | Author: Agitationist | Filed under: tutorials, wordpress | Tags: , , , | No Comments »

The problem. It’s a known fact that regular visitors don’t click on ads. Those who do click on ads are, 90% of the time, visitors coming from search engines.

Another problem is Google’s “smart pricing.” Being smart priced means that your click-through rate (CTR) is low and the money you earn per click is divided by between 2 and 10. For example, if a click would normally earn you $1.00, with smart pricing it could earn you as little as $0.10. Painful, isn’t it? Happily, this solution displays your AdSense ads to search engine visitors only, which means more clicks and a higher CTR.

The solution.

  1. Open the functions.php file in your theme.
  2. Paste the following code in it:
    function scratch99_fromasearchengine(){
      $ref = $_SERVER['HTTP_REFERER'];
      $SE = array('/search?', 'images.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.');
      foreach ($SE as $source) {
        if (strpos($ref,$source)!==false) return true;
      }
      return false;
    }
  3. Once done, paste the following code anywhere in your template where you want your AdSense ads to appear. They’ll be displayed only to visitors coming from search engine results:
    if (function_exists('scratch99_fromasearchengine')) {
      if (scratch99_fromasearchengine()) {
        INSERT YOUR CODE HERE
      }
    }

Code explanation. This hack starts with the creation of a function called scratch99_fromasearchengine(). This function contains a $SE array variable in which you can specify search engines. You can easily add new search engines by adding new elements to the array.

The scratch99_fromasearchengine() then returns true if the visitor comes from one of the search engines containing the $SE array variable.

Sources: 1, 2, 3

Bookmark and Share

When It’s Time To Change…

Posted: February 9th, 2009 | Author: Agitationist | Filed under: blogging, design, wordpress | Tags: , , | 2 Comments »

If you’ve been here before, you’ll notice a major change in the look of this site. Yes, this blog has reached puberty.

After about a month of writing this and looking at it every day, I decided I had outgrown the old theme, Split Personality by Wordpress Diva. I still think she did a wonderful job on it, and I love the concept of a theme that’s split right down the middle. However, the limited screen real estate for the actual content became limiting, and felt a bit claustrophobic.

And so, after trying on about 15 other themes for size, we move on to Clean Home by Bryan Helmig of Mid Mo Web Design. I’ve made a few changes to his typography, substituting the oh-so-trendy Helvetica where he used the more classic-looking Georgia. Just to be even more trendy, I’ve reduced the letter-spacing, to give the headers that squeezed-together look. However, Bryan’s layout is intact, and I think it will serve this site well.

Thanks very much to Bryan for the theme, and I look forward to hearing your suggestions and/or feedback, positive or otherwise.

Bookmark and Share