Bradley Spencer makes WordPress Simple.

Bradley Spencer makes success with WordPress simple. Improve your website or learn how to get more traffic today with a free estimate by email or phone. Or just keep reading below for tips and tricks for WordPress and SEO.

Javascript Conditional Code for Conversion Tracking in Google Adwords

by Bradley on January 16, 2012

I was working with a Squarespace site recently and needed to put some tracking code on the success page after a contact form.

I’m not as familiar with SquareSpace as WordPress and had to write some javascript code to run on a contact form tracking page.  Since no PHP was available to write, Eric and I did it strictly in Javascript.  Here’s the final code:

<script type="text/javascript">
if ((location.href)=="http:www.yoursite.com/trackingpage") {
/* <![CDATA[ */
var google_conversion_id = xxxxxxxx;
var google_conversion_language = "en";
var google_conversion_format = "1";
var google_conversion_color = "000000";
var google_conversion_label = "xxxxxxxxxxx";
var google_conversion_value = 0;
/* ]]> */
}
</script>

Naturally you’ll need to change these three values:

  1. Change http:www.yoursite.com/trackingpage to the exact URL of the transaction URL.
  2. Replace the xxxxxxxx after google_conversion_id to whatever your actual conversion is is.
  3. You’ll also need to change xxxxxxxx after google_conversion_label to whatever your actual label is, too.
That’s it!  Now this code can be included on every page but will still only trigger on the conversion page.

WordPress Comment Spam: How to get less comment spam on your WP Blog

by Bradley on January 15, 2012

Without the proper protection, comment spam is an absolute nightmare in WordPress.  Fortunately, the proper protections are very easy to come by.

As a primer, comment spam is any comment left on your blog that adds nothing to the conversation and was likely mass posted.  These comments sometimes look like:

Great post!  This makes me really think.

Or something like….

Wow, I couldn’t have said it better myself!

You can spot spam comments because they are usually positive in vibe and could fit just about any blog post.  The spammers do this in the hopes that the link behind their name will help their website rank better.  So if you aren’t sure if the comment is spam, a good way to tell is to look at where their name links to.  If it looks fishy, then you’ve got a spam commenter on your hands. read full article….

Google’s December Algorithm Change Hints at a Focus on Mobile Websites

by Bradley on January 12, 2012

Google released a breakdown of thirty changes to their search algorithm on January 5th.  If you didn’t make it to the bottom of the list, you missed something special:

Faster mobile browsing. [launch codename “old possum”, project codename “Skip Redirect”] Many websites redirect smartphone users to another page that is optimized for smartphone browsers. This change uses the final smartphone destination url in our mobile search results, so you can bypass all the redirects and load the target page faster.

In other words, if Google sees you are searching from a mobile device, they’ll send you directly to the mobile version (if there is one) of a website first.  This is huge news if you really think about the logistics behind this change.  This change means…

  • Google is taking note of websites with mobile versions of their website.
  • Google acknowledges that mobile users prefer a mobile version of a website.  (How long will it be before websites with a mobile version will get a boost in rankings for mobile users?)
  • Google sees a future in mobile and is preparing for it already.
I think little changes like the algorithm change above, and the new How To GoMo initiative by Google are hints of what’s to come with Mobile.  It’s exciting to see the avalanche begin, especially since I’m working on a DIY mobile builder.  Finally, as an SEO, it’s exciting to find a potential leg up on competitors by having a mobile website.
What do you think?  Do you think Mobile is going to take off?  Do you have a mobile version of your website?

SEO Tip: How To Recover From Panda

by Bradley on September 30, 2011

There is a lot of of advice about recovering from Panda, but I felt like this advice from Mike Gordon, the Toronto SEO Guy, was the most elegant: read full article….

Pull your latest tweet with PHP

by Bradley on July 5, 2011

Found some better code to pull your latest tweet:

<?php
	$username='thatbradleyguy'; // set user name
	$format='json'; // set format
	$tweet=json_decode(file_get_contents("http://api.twitter.com/1/statuses/user_timeline/{$username}.{$format}")); // get tweets and decode them into a variable
	echo $tweet[0]->text; // show latest tweet
?>

Backup Your Rackspace Cloud Site Automatically

by Bradley on June 30, 2011

I love RackSpace but was frustrated by how hard it was to set up automated backups for WordPress.  If you find yourself in the same boat, I’d really suggest checking out Automated Cloud Site backups.

And if you are frustrated by your current webhost, I’d really suggest you try RackSpace.  They are awesome, knowledgable, and have amazing uptime.

Video- How to go from Keyword Research to More Traffic in 17 Minutes

by Bradley on June 23, 2011

Awesome New Web Applications I’m Lovin

by Bradley on May 16, 2011

There are 2 excellent new web applications I came across recently that solve real problems.  They are:

PintPay.com:

Pintpay is a payment processor that is beautiful, easy to use, and is very inexpensive.  I’ve been looking for something like this for a new service I’ll be launching soon.  Charging a monthly recurring fee was starting to look like a huge project before PintPay came around.  Two thumbs up!

Help Scout:

I absolutely love LightHouse for working in groups.  The idea of using tickets to communicate really jives with my GTD mentality.  So when the makers of Lighthouse released TenderApp (basically a public-facing ticketing system), I was in heaven.  But until we have enough customers that we need to pay for TenderApp, Help Scout has a free option that is simple to set up and quite lovely.

Both of these have simplified my life.  I hope they do the same for you.

New WP Plugin lets you Search for Available Domain Names

by Bradley on March 31, 2011

One of my favorite parts of starting a new project is choosing a domain name. You want it to be memorable, maybe have a few keywords, and be something you are able to stick with for a few years.

A new plugin for WordPress lets you (and your readers) search for available domain names right from your sidebar. The plugin is called Domain Name Search.

read full article….

At SXSW

by Bradley on March 14, 2011

A typical SXSW panel

All the hype that SXSW Interactive gets is well deserved.  Or at least that’s my opinion after spending the last 4 days here.

It’s been a very inspiring few days.  I’m really excited to get home and put some of the things I’ve learned to use.

Steve Blank is responcible for my favorite panel this week.  The slides he used are here, though I doubt you’ll get 1% of the experience.  Sorry.

The gist of Steve’s presentation is that a new tech bubble is underway.  Based on the variety of startups with silly amounts of investment I’ve seen this week I’d have to agree.  He said that the rules are different in a tech bubble, and this bubble is different than the ones that preceded it.  Check out the slide deck to see the rest.

Most of my assertions about conferences based on Affiliate Summit didn’t end up being true of SXSW.  Overall I think SXSW is a way better conference and would suggest you go if you get a chance.

How to recover from burnout…

by Bradley on March 5, 2011

A suggestion for recovering from burnout from the lat Nobel Prize winner Richard Feynman:

Then I had another thought: Physics disgusts me a little bit now, but I used to enjoy doing physics. Why did I enjoy it? I used to play with it. I used to do whatever I felt like doing – it didn’t have to do with whether it was important for the development of nuclear physics, but whether it was interesting and amusing for me to play with. When I was in high school, I’d see water running out of a faucet growing narrower, and wonder if I could figure out what determines that curve. I found it was rather easy to do. I didn’t have to do it; it wasn’t important for the future of science; somebody else had already done it. That didn’t make any difference. I’d invent things and play with things for my own entertainment.

So I got this new attitude. Now that I am burned out and I’ll never accomplish anything, I’ve got this nice position at the university teaching classes which I rather enjoy, and just like I read the Arabian Nights for pleasure, I’m going to play with physics, whenever I want to, without worrying about any importance whatsoever.

Read more here

Much ado about nothing: Google targets content farms in a recent algorithm change

by Bradley on March 3, 2011

That's my kind of farm!

I’d like to contribute my personal two cents to the hot topic of the last week: Google’s Content Farm Algorithm Change.

The Background:

Google makes algorithm changes a few times per week. Usually their effects are pretty small, but this latest change was relatively big. Google makes a big show of it and lots of webmasters feel wrongly targetted.

But why should this algorithm change be any more public than the others?

I believe Google intended to make a big public statement with this change. It was a PR move as much as an algorithm change. There have been grumblings over the last few months that Google’s results are bad and getting worse. The allegation is that SEO’s are building pages specifically to rank high, and they are doing so successfully. The grumblings got loud enough that Google’s Search Quality group stepped in and made some comments.

The Algo Change:

So Google made a big scene with a ‘Content Farm’ algo change. The search results shift and push ‘content farms’ out of the top rankings.

What exactly is a content farm anyways? We might want to define ‘content farm‘ because good SEO writing looks surpringly similar to what everyone is calling a content farm.

SEOBook.com make an excellent point about the similarity between content farms and all other SEO writing:

“a lot of SEO content in not that different, and any algorithm that targets Demand Media’s [an alleged content farm] content isn’t going to see any difference. Keyword traffic stream identical to title tag? Yep. A couple of hundred words? Yep. SEO format? Yep. Repeats keywords and keyword phrases a few times? Yep.”

What makes these guys a content farm and the rest of us just followers of Search Engine best practices? Is it funding? Our SE ranking success? At what point does a ‘well-SEO’d site’ turn into a content farm? read full article….

Grab your latest tweet with PHP without File_Get_Contents()

by Bradley on February 28, 2011

Updated Code Here!

Many thanks to Nick Heer and his code for using php to pull your most recent tweet.

Unfortunately my host does not all File_Got_Contents() so that left me with curl:

<?php
								$username = "thatbradleyguy";
								$feed = "http://search.twitter.com/search.atom?q=from:" . $username . "&rpp=1";

								function parse_feed($feed) {
								    $stepOne = explode("<content type=\"html\">", $feed);
								    $stepTwo = explode("</content>", $stepOne[1]);
								    $tweet = $stepTwo[0];
									$tweet = htmlspecialchars_decode($tweet,ENT_QUOTES);
								    return $tweet;
								}

								//Initialize the Curl session
								$ch = curl_init();
								//Set curl to return the data instead of printing it to the browser.
								curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
								//Set the URL
								curl_setopt($ch, CURLOPT_URL, $feed);
								//Execute the fetch
								$twitterFeed = curl_exec($ch);
								//Close the connection
								curl_close($ch);

								//$twitterFeed = file_get_contents($feed);
								echo('&quot;'.parse_feed($twitterFeed).'&quot;');
								?>

Echoing phpBay in Your WordPress Template

by Bradley on February 17, 2011

I had a hell of a time trying to figure out how to call phpBay from a theme file rather than by using the shortcode.  After sending a quick email over to the developer, he eventually gave me this code which works like a charm:

<!-- start of ebay-->
<!--?php                   $text='[phpbay]"", "", "", ""[/phpbay]';                 echo phpBayPro($text) . "";                  ?-->
<!-- end of ebay -->

I hope this helps anyone else who is trying to figure this out.

Save 20% on PhpBay Pro WordPress Plugin with our PhpBay Coupon Code

by Bradley on January 25, 2011

Click here to head over to the PhpBay Pro Website.

PhpBay Pro is one of my favorite plugins because it does one thing, and it does it very well.  PhpBay Pro is, essentially, a way to pull ebay listings into your WordPress website very quickly and very simply.  People seem to use PhpBay Pro in two main ways: read full article….

7 Things NOT to Do When You Start a Business Online

by Bradley on January 22, 2011

Lately I’ve been reflecting a lot on the things I’ve learned from the last round of projects and websites I’ve been working on.  I wanted to distill some advice from the experiences so as to avoid making the same mistakes again in the future.  Hopefully this list helps you, too.

7 Things NOT to Do When You Start a Business Online

1. Make projections based on the size of the market.

When you are predicting the revenues for your business, don’t start with the size of the market.

Let’s take an offline example of a Lawn Mowing company:

In Columbus, where I live, let’s do a very rough estimate and say that the amount of money spent on commercial lawnmowing in Columbus is 20 Million dollars per year.

$20,000,000 spent on lawnmowing

So the aspiring lawnmower comes in and says, ‘Geez, if I just get 5% of the market then I’ll be bringing in 1 million dollars per year.’ You can do the math as many times as you want and it will always be a million bucks. And 5% doesn’t really sound like that high of a number, right?

$20,000,000 x 5% = $1,000,000

The truth is that getting 5% of the lawnmowing market would be very difficult. While this may be apparent in an industry as transparent and easy to understand as lawnmowing, the same idea holds true in an online business. But, for some reason, online entrepreneurs tend to consistently overestimate their future revenues this way.

So what should you do instead?

read full article….

Protecting Contact Form 7 from Spam

by Bradley on January 17, 2011

Contact Form 7 is my favorite free WordPress plugin for making (you guessed it…) Contact Forms.  It’s a very popular plugin, and that means that spammers have decided it’s worth their hassle to write some scripts to spam you through Contact Form 7.

Assuming your viagra need are sufficiently filled, you won’t be needing to see these emails.  So let’s figure out how to stop those spam messages from getting to you without making life more difficult for the real people who might want to use your form.

Based on my experience, these three changes should help really cut down on spam in Contact Form 7.

  1. Spam filtering with Akismet: Follow these instructions to make Contact Form 7 use akismet to test and see if the submission is spam.
  2. Install Bad Behavior Plugin: Install Bad Behavior.  You can read more about BB, but it works in a unique way to test for spam.
  3. Install Cookies for Comments: Because most spam bots’ browsers can’t accept cookies, this plugin will try to set a cookie on a user and if the cookie isn’t there then it considers it spam.  The plugin also tests to see how long it took the user to leave the comment.  If the commenter took a very short time (think a second or two) to leave a comment, chances are it’s spam.

Once these three changes have been made, your contact form should let much less spam through.  Of course, if you want to try a paid plugin for contact forms, I personally really love Gravity Forms.

How to Manually Insert the WordPress Sociable Plugin into your Theme

by Bradley on November 5, 2010

It took me forever to find this code which allows you to manually insert the Sociable Plugin for WordPress directly into your theme.  This helps when you want to place the plugin in a place that isn’t one of the options in the Sociable settings panel.

<div id='customsociable'>
<?php if (function_exists('sociable_html')) {
    echo sociable_html();
} ?>
</div>

Hope that helps!  And if you need more info about the Sociable plugin, you can find more documentation here.

Google Review Stars in Search Results

by Bradley on November 1, 2010

I’ve started noticing stars in my Google Results on reviewed places, products, etc.  They look like this:

Or for a place, they look like this:

It seems obvious that these would improve click-thru rates on a search result, so I went on a little search to find out how to include these on my sites.

Google allows these star ratings on review-type sites only.  I suspect you may be able to extend it to newspapers or blogs if you had people rating the articles, but I suspect Google must be using some type of system to avoid letting people put 5 star ratings on all of their content.

The process of adding this to your pages is surprisingly simple.  You just have to acquaint yourself with microdata and add a bit of code to each page.  An example looks like this for the pizza shop:

<div itemscope itemtype="http://data-vocabulary.org/Review-aggregate">
    <span itemprop="itemreviewed">L’Amourita Pizza</span>
    <span itemprop="rating" itemscope itemtype="http://data-vocabulary.org/Rating">
      <span itemprop="average">9</span>
      out of <span itemprop="best">10</span>
    </span>
    based on <span itemprop="votes">24</span> ratings.
    <span itemprop="count">5</span> user reviews.
  </div>

If you want to read more about Review Stars, check out this article by Google.  And if you end up trying this yourself then you are going to love the Rich Snippet Test Tool.

And if you are into this sorta thing, I’ve also noticed a coupon site doing something similar but adding a ‘Map This’ line to their results.  See here:

Rich Snippets may be the new wild-west of SEO.  They obviously improve click-thru rates on your result.  If I try some experiments soon, I’ll make sure to report back.

How to Hide Your Password Protected WordPress Posts from Google

by Bradley on October 29, 2010

Do you have password protected pages or posts in WordPress that you’d rather not have Google indexing? Well worry no longer!

If you add this code to your header.php file, it will tell Google not to index your password-protected content:

<?php if (!empty($post->post_password)) { ?>
<META NAME="ROBOTS" CONTENT="NOINDEX, FOLLOW">
<?php } ?>

Thanks and enjoy!