I wish I was a little bit taller, wish I was a blogger…

I’m tall enough, actually. But, you get the lyric (youtube).

I wish I Was a Baller

But I was in a great conversation yesterday with a recruiter who will be one of the great ones not long from now. We talked a lot about blogging back in the day (what, 2006? 2007 maybe) and how big it was.

Crazy that it seems like it’s just not that big anymore.

But, I realized this morning that I miss it. I miss the blogging. More than anything, I miss the sharing and pollination of ideas.

Lets see what I can do about that.

Using .htaccess to redirect old blog posts to a new domain with different permalink structure

wordpress-3-5Given my post about a new vision for ConnectedWell.com, I have determined to redirect all my “blog” posts from there to here… robertmerrill.wordpress.com.  Yesterday, I had tried to do this by:

  • Moving all my old posts to a “archive” category.
  • Adding code to single.php in my theme to extract all the posts in that category to a search string on the new site with the title of the post, hoping wordpress’s search function would catch it (which it did fairly well)
  • However, mobile themes and other problems didn’t make this elegant.
  • And, this isn’t forward-compatible with anything else that happens on the old website.

So, I kept thinking about how to do this… perhaps with a script running very early in loading WordPress, or perhaps with .htaccess??

Then, I realized that all my “old” posts happen to be in a “folder” of either the year 2008-2012 thanks to wordpress’ permalinks.  Looking into it, I found that redirecting the “permalink” URL on my old site to my new site was enough for the new site to determine which post it was and rewite the URL appropriately. So, with a little nosing around, the elegant solution appears to be:

  • Update .htaccess with the following line:
    RedirectMatch 301 /2012(.*) https://robertmerrill.wordpress.com/2012$1
  • This basically reads the incoming URL and if it’s in the base folder “/2012” then it takes the URL and redirects it to the new domain with a trailing “/2012” on it.  The “$1” appends the rest of the URL from the original link into the new URL.
  • The “301” after “RedirectMatch” specifies that this is the permanent redirect location for this link ( and that search engines should ignore the old link and use the new link instead)
  • Then, I added additional lines for posts from the years 2008-2011.
  • Save, upload the file and automagically, all my old posts redirect! No theme munging required, and this works very fast and across all future updates to ConnectedWell.

What’s especially awesome is that WordPress can figure out where the new post is on the new domain even through the old post’s permalink structure!

  • So…. the URL from the old site: http://connectedwell.com/2012/grief-and-healing-after-sandy-hook.htm
  • Gets redirected to: https://robertmerrill.wordpress.com/2012/grief-and-healing-after-sandy-hook.htm (note JUST the domain name is changing here)
  • But WordPress smartly changes it to fit the new domain’s permalink structure: https://robertmerrill.wordpress.com/2012/12/22/grief-and-healing-after-sandy-hook/ (this is WordPress default… “/year/month/day/slug/”)

Splicing Together WordPress Blogs

I’ve been trying to separate my blog content without destryong the central database I already have.  Here’s a solution I have used:

Put a fresh install of wordpress on your server (the same one holding the content you want to keep) and have it create a second set of WordPress tables.  Fully configure the new blog with all the settings you want to keep.

Then, hack the install so it gathers your posts and all other user information, etc, from the main WordPress Install, but gets the specific new blog items from the new blog you just created.

Hack “/wp-config.php” and add the line:
$table_prefix = ‘wp_’; //this is the table prefix of the main blog
$table_prefix2 = ‘hp_’; //this is the table prefix of my sub-blog

Hack /wp-settings.php and edit the line:
$wpdb->options = $table_prefix2 . ‘options’;

Good luck!

Submit Your Website to Google

If Google doesn’t know you’re out there, it won’t reveal your site in a search… even if you are the best blog out there on the Hamster Bill of Rights.  Submitting your site to Google is a step in the process.  If you can, use Google Sitemaps and submit your sitemap file to Google.  Otherwise, you may as well get started by at least letting them know about your homepage

Submit Your Homepage or Sitemap to Google

A Note from Google about this:

Please note: Only the top-level page from a host is necessary; you do not need to submit each individual page. Our crawler, Googlebot, will be able to find the rest. Google updates its index on a regular basis, so updated or outdated link submissions are not necessary. Dead links will ‘fade out’ of our index on our next crawl when we update our entire index.

Once you get your form submitted, get Adsense on your blog to be sure you’re earning money.

Using Google Adsense on Your Blog

Google Adsense Using to generate revenue (money) from your blog or website is an interesting proposition. Many “die-hard” bloggers have avoided it, calling it evil to trade clicks for cash on your website.

I was first bitten by the website publishing bug just after Christmas in 1996. The conversion took all of the 3 seconds it took to load http://www.yahoo.com (see what yahoo looked like then). I’ve been online in one way or another since then, but not until adsense have I been able to make reasonable money from my websites, while focusing on what I like to do–write and post cool stuff.

There are some very simple things you can do with adsense that, once you implement, you may never have to worry about them again. Some are common-sense, but will optimize your adsense success, getting you to the crucial $100.00 mark as fast as possible (so you can get your first check).

I will tailor most of this toward using adsense on blogs and blogging as this is what many people are doing these days.

  • First, get an adsense account. This is where you’ll get your source code
  • Next, determine how intensively you want to use Adsense on your site. Don’t just drop in some code and sit back on the couch waiting for the cash to roll in–it won’t
  • Determine ad size and placement
  • Put the code in your blog template — figure it out once and then you can forget it!
    Some blogs make it easy to add the code.  Blogger does, and I know there’s an adsense plugin for WordPress
  • Submit your site to Google, or use Google’s free sitemaps tool
  • Use Google’s free Analytics or another stats package to track your site.

A Word About Ad Sizes
It’s always nice when Google gives you a juicy tidbit like this one about ad-sizes:

As a rule of thumb, wider ad formats tend to outperform their taller counterparts, due to their reader-friendly format. Readers absorb information in thought units (that is, several words at a time). The wider format lets them comfortably read more text at a glance without having to skip a line and return to the left margin every few words as they would be forced to do with a narrower ad. The wider ad format also lessens the likelihood of readers leaving the ad unit altogether.

Since these formats allow users to read more text without having to skip a line every few words, users’ eyes have less chance to leave the ad unit altogether. If positioned well, these ad formats can increase your earnings. The formats we’ve found to be the most effective are the 336×280 large rectangle, the 300×250 inline rectangle, and the 160×600 wide skyscraper. Keep in mind that while these ad formats typically perform well, you should use the format that best complements your pages.

To Be Continued…

Google Adsense Wins More Loyalty

My loyalty may be fairly low on Google’s priority list, but for me, a two-bit blogger looking to capitalize my traffic, Google just won a great deal of respect and admiration from me.

About a week ago, I asked Google to give me an easy way to see what the current balance of my account is. (I guess the massive calculations required to add and subtract my credits and payments were giving my brain a blue-screen of death).

This morning, I logged into my adsense account and found a handy selection on Google’s homepage showing earnings since last payment.

Even better, all I asked for was a balance on the Payment History page. The solution Google implemented is at least a click faster to access!

Podcasting For Dummies — How do I make a Podcast?

I might be the last one on Earth to ask this question, but just in case I am not, I am blogging this for future generations:

I’ve been trying to make podcasts and finally, I think I have all the tools:

We’ll see where we go from here!

How do I show WordPress categories as Tags?

Tagging is defined by the rel="tag" property of the tag in HTML.  From the Technorati Developer’s Wiki:

RelTag is one of several MicroFormats. By adding rel="tag" to a hyperlink, a page indicates that the destination of that hyperlink is an author-designated “tag” (or keyword/subject) of the current page. Note that a tag may just refer to a major portion of the current page (i.e. a blog post). e.g. by placing this link on a page,

<a href="http://technorati.com/tag/tech" rel="tag">tech</a>

the author indicates that the page has the tag “tech”.

The linked page SHOULD exist, and it is the linked page, rather than the link text that defines the tag.

Tagging, so-called, is a human-implemented tool that helps search engines (and other people) classify information on a page or feed and intelligently organize their relationships.  

On your computer, or in your email program, if you use folders to categorize data, you are, in a way, tagging them into a nomenclature you can rely on later to extract information.

A natural tag we put on blog items is the category we decide they should be in.

But, the native install of WordPress doesn’t format your category links with the rel="tag" property.  We have to help things along…

To update your WordPress install so that all categories in the posts are displayed as tags, you need to edit the file /wp-includes/template-functions-category.php.  Simply use your text/HTML editor to find-and-replace the following strings:

find:'<a href="'

replace it with: '<a rel="tag" href="'

Notes:

  • Making a mistake in your code here may break your blog.  Backup this file before you edit it, just in case!
  • Although this hack will survive between themes, when you upgrade to a new WordPress version, this hack may be lost.  Bookmark this page, or add it to del.icio.us so you remember.
  • I recommend you do NOT add the rel=”tag” specification to your generic “whole site” category listing–this is overkill and will falsely tell the search-engines and spiders that visit your site that every page on your site is tagged with all the same things.  That destroys relevance of tags…
    it would be like having all contestants in a race finish at the exact millisecond and then trying to declare a winner.

{

I used Simplecode to help with the code-formatting on this page

}