Amazon Affiliate Linker Wordpress Plugin

The Amazon Affiliate Linker Plugin allows easy linking to Amazon.com products by only using the ASIN (Amazon Standard Identification Number). It also allows you to embed your Amazon Associate link so that you can pick up affiliate commissions on your links.

Download Amazon Affiliate Linker Plugin

Once downloaded and activated, the plugin needs to be configured by going to Settings -> Amazon Affiliate Linker menu item. In this page you can set your Amazon Affiliate ID and whether you want the link to be no-followed or to onen in a new window.

Amazon Affiliate Linker Wordpress Plugin

To embed an Amazon link with the plugin, the text for the link needs to be embedded in the following tags:
Test ASIN Link
This will link to Amazon.com with a product ASIN of 12345678. At present, the asin tag needs to be lower case.

For example, if I wanted to link to ProBlogger: Secrets for Blogging Your Way to a Six-Figure Income, I would get the ASIN for it’s from Amazon.com URL:

Problogger Secrets Link

I would then embed the ASIN into into a post like this:
Problogger Secrets Plugin Link
Which would produce a link like this:

[asin=0470246677]Secrets for Blogging Your Way to a Six-Figure Income[/asin]

The attributes for the link are configured in the plugin administration and has my Amazon Affiliate ID embedded into it.

I have tested the link generation and there seem to be no problems with clicks being registered in the Amazon Associates stats report and I have tested the generated links in the Amazon Associate Link Checker.

Download Amazon Affiliate Linker Plugin

Posted in Wordpress | No Comments

How To Set Up A .htaccess 301 Redirect In WordPress

For a number of reasons, you may find that you need to send traffic from one page on your blog to another. An effective way of doing this is to use a htaccess 301 redirect.

When I released the custom menu plugin, I made the mistake of notifying a website that it’s URL was http://www.clubwordpress.com/club-wordpress-custom-menu/, so when I checked my analytics report, I noticed that a load of traffic was being sent there and getting my 404 page.

Getting the link changed could have been tricky, so instead I needed to set up a redirect in my .htaccess file to send traffic from:

http://www.clubwordpress.com/club-wordpress-custom-menu/

to:

http://www.clubwordpress.com/wordpress-custom-menu-plugin/

Here is how to do it:

1. Make a backup of my original .htaccess file

This is very important. It is extremely easy to make a mistake or typo in the .htaccess file which can take down your whole website. If this happens, all you need to do is swap your original .htaccess file into your blog and sort out where you went wrong.

2. Open the .htaccess file for editing

You will now need to get your .htaccess file from your webserver using FTP and open it for editing.

Wordpress .htaccess

If you can’t see your .htaccess file, then your FTP client may not be configured to show hidden files. To find out how to set this type “[FTP client name] show hidden files” into Google and you should find out how to do it. e.g. Filezilla show hidden file names.

If you are using permalinks on your blog, then your .htaccess file may look something like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

This is all stuff for re-writing your URLs and shouldn’t be messed with. Any edits that you make should be outside of the #BEGIN and #END Wordpress lines.

3. Add the redirect line to the .htaccess file

Now add the redirect. You need to specify the relative URL you are redirecting from and the full URL you are redirecting to. Getting these wrong can take your blog down. I know because I have allready tried it.

So, the redirect should look something like this:

redirect 301 /old-url/ http://www.myblog.com/new-url/

We are using the 301 to notify search engines that the page has moved permanently. If it was a temporary redirect we would use 302 instead.

4. Upload the new .htaccess file

Once you have added the redirect, you can now upload your file to your blog. If your .htaccess if readonly, you will nead to make it readable before uploading.

You can now test the redirect. If your site goes down, then you have probably made a typing error, so put the original backup of the .htaccess back while you find what you did wrong. You did make a backup didn’t you?

Once you have found the error, upload again and hopefully you should be good to go.

Posted in Administration | No Comments

Bare Minimum WordPress Theme

This theme uses the bare minimum files that are needed for a WordPress theme – `index.php` and `styles.css`.

Bare Minimum WordPress Theme

Download Bare Minimum WordPress Theme

I wanted to build a new theme for ClubWordpress from the ground up. This is the first stage of the theme and I thought it would be of interest to some people to release it as a theme in its own right.

You probably wouldn’t actually use this theme on a live site, but it would be worth taking a look at if you wanted to see the bare bones of how a WordPress theme works without any extra markup and other fancy bits and pieces getting in the way.

All the functionality is in the `index.php` file. The header, posts, sidebar (search, categories, pages, archives, etc) and footer are all included here.

There is no css markup in the template to complicate things further, but the styles.css file has to be included as it is needed for the theme to function in WordPress. It only includes the information for the theme that appears in the Theme Selection part of WordPress admin.

Download Bare Minimum WordPress Theme

If you download it and give it a try, please let me know what you think of it in the comments :)

I will post some further iterations of this theme over the coming weeks, so check out my RSS Feed to keep updated.

Posted in Themes | No Comments

Wordpress Custom Menu Plugin

This is a very simple plugin that I wrote to manage navigation menus from the admin panel in WordPress instead of having to code the template each time a menu or a menu item was added, removed or changed.

Download Wordpress Custom Menu Plugin

Menu items are added in the Tools->Custom Menu section of WordPress Admin as displayed below:

Club Wordpress Custom Menu Admin

Menu items can be added, edited and deleted here. Use the Visible property to set whether an item is displayed.

To display the Custom Menu in a WordPress theme, add the following code to your template file where you want the menu to be displayed:

<?php custommenu_output(); ?>

For the menu items displayed in the image above, the following HTML will be output in the theme:

<ul>
    <li><a href=’/’ title=’Home’>Home</a></li>
    <li><a href=’/articles/’ title=’Articles’>Articles</a></li>
    <li><a href=’http://wordpress.org/’ title=’Wordpress’>Wordpress</a></li>
    <li><a href=’/sitemap/’ title=’Sitemap’>Sitemap</a></li>
    <li><a href=’/contact/’ title=’Contact’>Contact</a></li>
    <li><a href=’/about/’ title=’About’>About</a></li>
</ul>

The menu is output as an unordered HTML list.

Download Wordpress Custom Menu Plugin

All you need to do then is make sure the HTML is styled properly to display the menu correctly. I may do a tutorial on how to do this if there is enough interest, so check out my RSS Feed to keep updated :)

Please let me know what you think of the plugin and what improvements could be made to it.

Posted in Plugins | 1 Comment