How to Enable Auto-Tagging for Syndicated Content

So you wanna supplement your site with syndicated content, but don’t have the time to give each syndicated post unique tags? This was the situation for a client of mine already using the FeedWordPress plugin.

Diving right in… First, you’ll need to install and activate the Calais Archive Tagger plugin. (BTW, you will also need to get an API Key by going to http://opencalais.com/) The problem with using this plugin as is, is that it must be manually triggered to tag existing posts. Who wants to login and hit a button every so often to auto-tag aggregated content?

Then the WP Calais Auto Tagger plugin analyzes posts as they are being written and comes up with what it thinks are appropriate tags. The only problem is that for syndicated posts, this writing phase doesn’t really happen. So, again, these are great tools that almost get us to our goal of auto-tagging syndicated posts, but we’re not quite there yet…

In order to get syndicated posts auto-tagged without having to click the admin button, we need to set up a cron job and add another file to the wp-calais-archive-tagger plugin folder.

Additional file hack to be added to your wp-calais plugin folder

This is a heavily modified version of the WP Calais Archive Tagger plugin, which will work as a bridge between the auto-tagger and a cron job set up on your host.

Download calais_cron_tagger.zip, (unzip) and upload it to the main wp-calais-archive-tagger directory inside your plugins directory. You may want to edit the number of posts it auto-tags (clearly commented in the PHP file) and if you have any trouble getting it to work with your host’s cron job, you may need to contact your host and ask them about the exact path to cron job and add an appropriate line to the top of the file .

Cron Job

You’ll need to login to your site’s main control panel and locate the Cron Jobs section. Choose ‘standard’. Now the exact phrasing required may vary for your host and the location of PHP.ini. For many, the location of PHP.ini is /usr/lib/, so the command to run will be:

/usr/lib/ http://YOUR-SITE.com/wp-content/plugins/wp-calais-archive-tagger/
calais_cron_tagger.php

(the above text has a line break so it will fit on this page, if you copy it to modify with your URL, be sure there is no line break in the Cron Job command text)

Then you need to select how often this file will be run. You may need it to run only once a day, or as often as every hour. Play with the cron job settings as well as the number of posts (in the wp-calais-cron-tagger.php file) to get tings configured optimally for your site.

Finding the path to PHP.ini on your host’s server

If the above /usr/lib/ path does not work, you can (unzip, then) upload info.php to the root of your site. Once uploaded, you’d go to http://YOUR-SITE.com/info.php. Scroll down to where it says Configuration File (php.ini) Path, and next to that will be the exact path you need at the beginning of your cron job command.

Need further assistance?

Contact me with your URL and briefly describe what your auto-tagging needs are. I’ll get back to you with a quote ASAP.

Erin Bruce