Archive for the ‘ WordPress ’ Category

How To Display Amazon Affiliate Enhanced Display Ads Side-by-Side in WordPress

Amazon Enhanced Display Ads in WordPress

Amazon Enhanced Display Ads in WordPress

Adding the “Enhanced Display’ (Image + Text) Amazon Affiliate ads in WordPress can be a pain in the neck – for some reason WordPress and Amazon Enhanced Display Ads don’t work together well. Luckily, there is a way it can be done, it just requires a little extra work.

    1. Edit the post in HTML mode, not in the Visual Editor (the Visual Editor will strip out the iFrame code) – you can create a draft of the post in the Visual Editor, but you’ll want to switch to the HTML editor when its time to add the Amazon Enhanced Display Ads
    2. Copy & Paste the Amazon Affiliate Enhanced Display Ads where you want them in the HTML editor once the post is ready for them
    3. If you have multiple Enhanced Display Ads and you want them to appear side by side (instead of each one appearing on top of each other), then you’ll need to add the iframe align attribute.  It should be inserted right before or after the scrolling=”no” attribute. Update, Amazon changed the code for these so the method is slighty different. I have both illustrated below to help:

OLD VERSION: 

NEW VERSION: 

Other tips:

  1. You will probably need to enter line breaks after the Ad. This can be done by inserting “ ” on seperate lines to create line breaks. Add a few and see how many more you need to make it look right.
  2. Update the post (while still in HTML Editor) and do not switch to Visual Editor otherwise you’ll lose everything
  3. Tweak the code in the HTML editor by adding extra line breaks until you get the desired result.

And that’s it! For an example of this in the live, check out my guide on how to hardwire an Escort Passport Radar Detector which the above screenshot was taken from. I hope this helps you earn money and enhance your blog posts 🙂

How to Fix Warning: Cannot modify header information – headers already sent Error Message in WordPress

After transferring my WordPress site to a new server, I received this error when trying to log in to the WP-Admin panel

Warning: Cannot modify header information – headers already sent by (output started at /home/nnnick/public_html/nickroshon.com/wp-content/plugins/wp-security-scan/scanner.php:63) in /home/nnnick/public_html/nickroshon.com/wp-includes/pluggable.php on line 890

I had no idea what that means, but without being able to log in to the Admin panel it was a little hard to get rid of it. At first I thought about just going in and deleting the plug-in referenced above and seeing if that would work (it did work, although there were many other plugins that were also causing this error, as well as the theme itself, which I didn’t want to delete!). Given I didn’t want to delete all of my plugins as well as the theme itself, I began exploring other options.

Upon doing a Google search for this error, I found many helpful articles, but none that were quite helpful enough – they give tips, but some of the details were a bit fuzzy. This post on WPContempo, as well as these two posts on the WordPress.org forums (1) and (2) were helpful, and explained that:

You likely have an extra white-space or line at the beginning or end of your WP-Config file. Open your WP-Config file and delete an extra white-space at the beginning or end of the file, then delete it.

That is mostly correct, but a little unclear and didn’t totally fix my problem. Here is the dumbed down explanation.

  1. You probably do have extra lines at the beginning or end of a file, although it isn’t necessarily your WP-Config file. If your error message looks like mine above, it is in a specific file related to a plugin, theme, or other add-on to your WordPress install, although its possible your WP-Config file also has extra white space too. During the transfer of your site, some of your files (for whatever unknown reason) grew a few mysterious empty lines at the beginning or end, which screws everything up…  Extra Spaces at End of File WordPress
  2. To find the files with the extra lines, look at the error message itself, as it will tell you exactly which file is causing the issue. At the example at the top of this post, “Warning: Cannot modify header information – headers already sent by (output started at /home/nnnick/public_html/nickroshon.com/wp-content/plugins/wp-security-scan/scanner.php:63) in /home/nnnick/public_html/nickroshon.com/wp-includes/pluggable.php on line 89″ the part bolded is the cause of your problem. It is telling you the Scanner.php file has an extra space on line 63, which happened to be the last line of the file (and sure enough, it was blank).
  3. To fix it, either connect to your site via FTP, or through the File Manager in your cPanel (note: connecting via FTP is better as the cPanel may add extra lines itself, although I had no problem doing this through the cPanel myself). Within either your FTP or cPanel File Manager, navigate to the location of the file causing the problem (public_html/nickroshon.com/wp-content/plugins/wp-security-scan/) in this example, and then open the file name referenced (scanner.php). Look for the line number after the colon, again in this example line 63. Remove the extra lines starting at that line number, and then save the file and close it.
  4. Try reloading your WP-Admin page. Chances are you’ll see the same error message again, only a new file is causing the problem…repeat steps 2-3, looking for that exact file and line number and removing spaces. With one of my rather customized blogs I had to do this probably 10 times before I could get rid of all the error messages, but eventually I had corrected all of them, and am now able to log in to my WP-Admin just fine!

And that’s it – I hope this was helpful to others out there that may have had some problems like me. It is definitely something you can figure out, even if you’re not an expert programmer – you just need a little patience as it is a tedious process of hunting for extra spaces and lines.

The First Three WordPress Plugins You Should Install

WordPress Admin Panel

I’ve recently started yet another WordPress blog (just like the default tagline says), bringing my total count up to four active blogs that I control. Now that I’m starting to get the hang of this, here are the first plugins I recommend installing right away on your new WordPress blog to kick things off on the right foot:

  1. Akismet – this blocks comment spam. If you don’t have this plugin, or one like it, you probably spend all day moderating your comments, or your blog is so new even spammers haven’t found it yet – but trust me, they will. Install Akismet and 99.9% of your spam problems will go away.
  2. WP Security Scan – after getting hacked last year, I realized WordPress has some pretty significant security flaws – since its open source, anyone can read the back end code and figure out how it all works – and everyone shares the same basic platform, which means that once you learn to hack one WordPress blog, chances are you can hack just about any of them. WP Security Scan both scans and fixes your WordPress blog for most common vulnerabilities, which will make it much harder for hackers to gain unauthorized access to your blog compared to the average WordPress install. This plugin takes seconds to install, but will save you hours of headache if a hacker every targeted you.
  3. WP Minify – a fast loading blog is a healthy blog. WP Minify compresses Javascript and CSS files to improve page load time. It’s well known within the SEO community that Google uses page load speed as part of their ranking algorithm, so every second you can shave off that loading speed can only help.

Of course, this list would be incomplete without mentioning two other things you should do as soon as you start a new blog:

  1. Sign up and verify your site in Google Webmaster Tools – this will alert you of any issues Google has crawling your site, as well as a wealth of other data like inbound links, relevant keywords, and much more. It will also get your site crawled by Google sooner rather than later, so you’ll start showing up in the search results.
  2. Sign up and implement Google Analytics, either using a plugin like Google Analytics for WordPress or manually inserting your tracking code into the footer. This will help you monitor site performance over time, and find referring networks that you can interact & engage with to grow a loyal base of readers to your blog. And since Google Analytics is completely free, there is no sense not collecting this data, even if you don’t plan on using it right away – in a few months, you’ll probably be interested and wish you had been tracking your site since the beginning.

I hope this was helpful – let me know if I left off any good suggestions in the comments section below!

Easy Tips to Speed Up Your WordPress Blog

Speed Up WordPress with Common SenseConcerned with Google’s indication that Page Load Speed May Become A  Ranking Factor, I began to look at my own WordPress blogs to see if I can speed up my page load time. In particular, my Modified Car Blog loaded very slowly, to the point where it was actually annoying to users as well.

I read some great posts on technical tricks and hacks to speed up your WordPress blog. Two in particular I found useful were WolfHowl’s post How to Speed Up WordPress and WPGarage’s 38 ways to optimize and speed up your WordPress blog. Plugins recommended in these posts like WP-Minify really seemed to help speed things, but Nick’s Car Blog was still painfully slow.

A test using this website speed test tool of my home page, http://nickscarblog.com, baselined at around 10 seconds to load. After implementing many of the technical tricks in the posts referenced above, it was closer to 5-6 seconds – better, but still pretty bad. I ran a few comparable sites to my blog and they were all around 3 seconds or less.

Then it was time to go back to the basics. Here are some “common sense” things you can do that require no technical tricks, plug-ins or code. These are simple things to make everything load quicker.

  • Use the More Tag for posts that have lots of images. I had several posts that were loaded with over a dozen pictures, often technical articles with DIY Guides to install car parts. By only providing one image and a snippet of the content, there isn’t so much to load on the homepage. I think this was the most effective way I reduced my homepage’s load speed. I also think it really cleaned up the appearance and organized the content better as well.
  • Compress Images – I had several images that would load in the header and throughout the blog that were pretty large – by just a slight adjustment in resolution I could cut the file size in half without the end-user ever really noticing.
  • Remove plug-ins you’re not using anymore, or don’t find very useful – if a user probably would never use it or find it beneficial – toss it. Sometimes a little plug-in “Spring Cleaning” is in order.
  • Contact your hosting company – maybe there is something on their end they can speed up. Or maybe you just have a really crappy hosting company.
  • Remove some of those Digg/Spinn/Reddit buttons. Is anyone seriously going to Digg your About Me page? I don’t think so.
  • Consider your WordPress theme. A simplier theme will load quicker. A really fancy, widget- and animation-heavy theme will load slower. You don’t have to kill your fancy-pants theme off, just try a new one and see if it affects loading speed with a website speed test. Who knows, you might find something you like better.

The end result? My Car Blog now loads in 2.66 seconds. I didn’t lose any content or images, and by using the “More” tag I expect to see a decrease in bounce rate as there is more of an incentive to view the Post Page as opposed to just reading the whole post on the homepage. Some images are more compressed, there are fewer social sharing buttons (but the ones that appear are likely to be more useful), and the blog appears less cluttered, better organized, and oh yeah – a heck of a lot quicker too. Let me know if I missed any more “common sense” ideas in the comments below!

Reblog this post [with Zemanta]

New Logo & Look for NickRoshon.com

A New Year and a new look…2010 is going to be big.

Special thanks to Collin Cornwell for the logo design as well as Ben Kwan of The Sweet, The Sour for the theme inspiration!

And now back to our regularly scheduled programming…

How to Fix Problems with Comments in the Carrington Theme

My WordPress blog uses the Carrington Theme, which I’ve been really happy with. However, there has been a bug where you can’t comment from the home page – you had to go to the individual post pages to comment. When you hit the Comment button from the home page, it kind of just froze up and did nothing or the screen would go blank.

I searched a bit and found a number of suggestions to disable AJAX in comments and that often fixes issues related to comments. While no-one was reporting the exact issue I was looking for, I found this solution offered enough times I thought it’d be worth trying – and sure enough, it worked.

You can disable AJAX in comments by going to:

WordPress Admin – Appearance – Carrington and you will see the following options:

Disable-AJAX-Comments-Carrington

The default for Load archives  and comments with AJAX is yes – so just change this to No and hit save. This page is also where you enter the footer code for Google Analytics, which I had trouble locating a while back as explained in this post.

And voila – problem gone! In the process I noticed that the Carrington theme is now in release 2.2 – I still have 1.3 so I might look in to upgrading it. If you notice any formatting issues in the meantime please leave me a comment (esp. now that they work!) and I’ll look into it!

Setting Up Google Analytics for WordPress – A Wealth of Data for Free

Google-Analytics

Wow, I don’t know what I was thinking for the first 3 months when I using the basic “Awstats” program on my server as my only software to track traffic, visits, incoming search keywords, and all of the other vital information about visitors to my website.

Google Analytics is free, provides an almost overwhelming amount of data, and is super easy to integrate with WordPress. If you are running a WordPress blog and haven’t upgraded your analytics software, I suggest you hop over to Google Analytics now and get started. This should take 5, maybe 10 minutes tops to get setup (full disclosure, it took me about an hour, haha), and whether you are a data geek or not, you’ll find out some cool stuff about your visitors that will help you connect with your audience better, so it’s good to check out no matter what your background is.

You can use your existing Google account and within a minute or two Google will give you a 10 digit ID number like UA-0000000-1, which you’ll need for the next step.

Next, you’ll want to install the Google Analytics for WordPress plugin, which you can do by clicking the link in the last sentence or by going to your WordPress Site Admin – Plugins – Add New and search for “Google Analytics.”

Once installed and activated, all the plugin requires is your analytics ID (i.e. UA-0000000-1 in the previous example), which can be found right next to your URL in the Analytics dashboard. The plugin will then automatically insert the necessary code in the footer of each page.

One caveat (and why it took me ~1hr to get all of this going): some WordPress themes take control of the footer, including the theme I’m using called “Carrington.” If the code isn’t being automatically inserted into your footer due to your custom WordPress theme (the Google Analytics dashboard will have a ! sign instead of a green check in the Status column), it may require you to go into Site Admin – Appearance – Editor – default footer and entering the code yourself, or in the case of Carrington you can go to Site Admin – Appearance – Carrington and there is a custom field there that reads “Footer code (for analytics, etc.).”

Anyway, what does this get you? A lot. And it’s free. Some sample statistics & screenshots:

Top-Traffic-Sources Top traffic sources show where my visitors are coming from. It’s kind of neat to see such a high amount of natural search traffic coming from Google, but also interesting that my twitter account has generated a decent amount of traffic, as well as my flickr account and a few blog comments I left over at at Agency Spy on MediaBistro.com. I guess this shows why it’s important to promote your website holistically through a number of channels, not simply relying on just one media channel (i.e. twitter) to generate traffic. I’m getting traffic from places I’m not even intentionally soliciting it from (like the blog comments).

Keywords-Driving-TrafficAnother good one is the keywords driving traffic to my site through Google. You can tell that they are relating around three very recent blog posts I had on Google’s Treatment of NoFollow and how it will impact blogs, A Social Media WordPress Plugin I recommend, and my tips and advice for the new Facebook Vanity URLs that rolled out earlier this month. This reinforces the core truth about blogging, SEO, and internet media in general: fresh, timely, and relevant content will get you more visitors and well-written, useful, informative or otherwise enjoyable content will keep them coming back.

Browser-Statistics Browser statistics shows what internet browsers people are viewing my site on. It makes me so happy to see MS Internet Explorer at the bottom. To me, this tells me my viewers are more tech saavy and don’t use IE just because it was the default browser and they upgraded to a browser that doesn’t completely drag ass and generally suck at the internet.

There’s tons more information in here, but you’ll have to set this up to find out. You’ll notice in both screenshots above there is an option to view a detailed report on each data point, showing just the level of detail you can drill down to.

Recommended WordPress Widget: Social Media Page

Social Media Plugin for WordPress

Social Media Plugin for WordPress

I haven’t fiddled around with my blog design as much as I’d have liked to, but here is one plug-in I highly recommend: Social Media Page.

As seen on my side bar where it says “Connect with Me,” this widget offers a clean looking format for listing all of my social networking profiles. These are direct, SEO-friendly links along with little logos to look a little more professional then just the standard WordPress “Links” section.

The plug-in is super easy to use and even helps you find the URLs of your public profiles in case you don’t already know them. In my case, it also reminded me to go ahead and update some of those profiles as they hadn’t been touched in years. Once I had all of my URLs selected I just had to go into the WordPress Admin – Appearance – Widgets and have the widget show in my sidebar.

Anyway, just a quick post, but go check it out. And since I’m all for giving link love, here is a link to the author’s personal website, Philip Norton.

Create WordPress Pages

At first glance, it doesn’t seem like there is much of a difference between a new post and a new page. In fact, there really isn’t a difference if you are using the default WordPress theme. But once you upgrade to a new theme (like mine) you’ll see why Pages are helpful:

  1. They are placed in a prominent location for quick navigation
  2. They don’t need to be put in a category so you can have really simple URLs if you are using optimized URL permalinks like described in my earlier post.

These are most commonly used for pages like About this Blog, About Me, Links, Partners, etc. These are permanent pages that you think everyone should read, and these “posts” won’t get buried once you post new content – a link to them will always be easy to find. So as you start out your new blog, go ahead and make a few pages so that new readers can quickly learn more about you and what your blog is all about. You create a Page just like you’d create a new Post through the Admin panel (only you go to Pages – Add New instead of Posts – Add New) – just remember to make the Title of the Page something that will easily fit into your quick links navigation at the top…

Here is where the pages show up on my current theme, called “Carrington”

Example of WordPress Pages
Example of WordPress Pages