Posts Tagged ‘ WordPress

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.

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…

I’ve Been HACKED!

Hackers (film)

Image via Wikipedia

I really need to get off a shared server. It’s cheap, but then you could be sharing your server with someone up to no good…

Also, time to install a boat-load of security plug-ins. My blog was hacked by accessing the wp-config.php file, and this site has a good tip on how to lock that down, as well as encrypting passwords and other stuff: 18 Plugins & Hacks to Protect Your WordPress Blog

I’ve deleted any information about the hacker since he told me how he was able to hijack my blog – luckily, he only got into the wordpress admin and not the server or any of the backend. I will be moving everything to a new server soon – stay tuned, and pardon any interruptions in the meantime.

Reblog this post [with Zemanta]