LinkShare AdMix and SEO Friendly Images plugins

If you are a LinkShare affiliate, there a great plugin called LinkShare AdMix that uses the RSS feeds of retailers you have partnered with to automatically insert posts of each item in the feed.  I had to do 2 things to get it to work:

  1. Line 111 of feedwordpress.php, I had to change $fwp_path = ‘feedwordpress’; to $fwp_path = ‘linkshare-admix’; because the code was not finding the install folder correctly.  Changing the folder name from “linkshare-admix” to “feedwordpress” may have worked too, but there is already a FeedWordpress plugin (which this plugin is based on) out there and should you need to install both for some reason, you don’t need them butting heads*.
  2. Be sure you copy the included Magpie RSS  files into your wp-includes folder to get everything to work right.

I noticed that the images the Linkshare feed was posting were not SEO’d – no alt or title tags.

Enter the SEO Friendly Images plugin which adds alt and title tags for you based on the posts title and keywords.  But it didn’t work.

Usually plugin problem lie in an incompatibility with another plugin, so I disabled a plugin one at a time to determine which one was causing the problem.

Guess what?  It was the LinkShare AdMix plugin.

I wondered if the original FeedWordpress plugin had the same problem, so I disabled the LinkShare AdMix plugin and installed the FeedWordpress plugin.  Same problem.  I remember seeing filters were called in the source code, so I searched for “filter” and found a commented paragraph about preserving the feed and not allowing other plugins to change it.  The 2 offending lines of code followed, and I promptly commented them out:

//add_filter(‘the_content’, ‘feedwordpress_preserve_syndicated_content’, -10000);
//add_filter(‘the_content’, ‘feedwordpress_restore_syndicated_content’, 10000);
Update: Yes, I totally missed the built-in option to “Expose sydicated posts to formatting filters” under Syndication options > Post & Links > Formatting >Formatting filters. *facepalm*  But this only works for the FeedWordpress plugin.  LinkShare AdMix plugin does not have this option, so you will need to comment out the 2 lines of code above to get it work with the SEO Friendly Images plugin.
Commenting out that code worked.  Just remember you will need to do this again when the Linkshare Admix plugin gets updated.
In the end, I think I will stick with FeedWordpress instead of LinkShare AdMix because I get more fine tune control and easier to add RSS feeds.
*I think installing both LinkShare AdMix and FeedWordpress would not workout because then need different versions of Magpie RSS.  Some recoding would be required to get them to play nice.

XML Sitemap Generator Plugin for WordPress error

I hate SEO.

Hate it.

Hate it to death.

But it’s a necessary evil so I have to deal.

So I am very happy when I can find plugins that will do a lot of  the work for me.

One such plugin is the popular All In One SEO.

Another is the XML Sitemap Generator Plugin for WordPress which does just as the name implies: it generates an XML sitemap for your WordPress site. An XML sitemap helps search engines crawl through your site more thoroughly. The plugin can be configured to notify various search engines of changes to your site so they will queue up your site to get crawled again to find and index the new content.  You can also add the XML sitemap URL to your Google Webmaster Tools account.

After installing the plugin I kept getting an error when I tried to manually create a sitemap:

There was a problem writing your sitemap file. Make sure the file exists and is writable.

Note: I’m running WordPress on a Deluxe Windows Hosting account at

I checked to make sure the folders and files had writable permissions and they did.

Then I noticed the setting on the plugin config page called “Location of your map file”.  I wondered if the plugin was having trouble finding the proper location to write the file.

The location setting was on “Automatic” so I switched it to “Custom location” and entered the relative path where I thought the file should be.  No good.

The “Custom location” also takes an absolute path.  Using an absolute path might come back to bite me later should the server change, but I wanted to make sure this worked.  So I wrote a quick PHP script to find the absolute path of my site root (where the sitemap XML should be located):

echo realpath(“index.php”);

Realpath is a PHP function that retrieves the absolute path of the specified file.

I uploaded the PHP file to the root folder of my blog and ran it on the site.  I then copied and pasted the path into the Custom Path setting.

And it didn’t work.

I gave up for the day.  I came back today to try to fix the problem and found there was an update for that plugin that was available (3.1.6 as of this writing).  I updated the plugin, and it worked!

I’m not 100% it was the update that fixed it, but it’s working now.

Just to be sure, I switched it back to the “Automatic Detection” setting.  It failed.  Switching it back to Custom worked fine.