Having a welcome message at the top of a blog the first time you visit seems to be all the rage right now. I wanted to be able to do something similar but be able to show a different welcome message depending on what site people come to mine from. So here is a plugin for Wordpress which will do just that…
Download
Referer Message Plugin v1.0 (tar.gz)
Referer Message Plugin v1.0 (zip)
Installation Instructions
- Download and extract the tar.gz or zip file from the link above.
- Copy the whole referer-message folder to your wordpress plugins directory.
- Activate the plugin from the plugin page in your wordpress admin.
- Go to the options page and edit the messages on the newly created Referer Messages panel. You can match the referers by the whole site, subdirectories or single pages, and have a custom message for each new referer that you add - plus there’s a default message for people who have visited directly.
- Use
<?php referer_message();?>anywhere in your template, or add the widget to your sidebar.
Troubleshooting
If you get a Cannot modify header information - headers already sent error when using the plugin, you just need to turn on gzip compression in Options > Reading menu.
Credits
This plugin is a new take on the Welcome Visitor! Reloaded plugin by Alaeddin. This is turn was largely based upon the original Welcome Visitor! plugin by Kaf which was released under the GNU General Public License.










Comments
on 27 Feb, 2008
I’m getting 404′d for both of the download links.
I’d like to get even more specific, and have a specific message if, say, someone got to my blog by searching for my name. Is that possible with this plugin?
on 27 Feb, 2008
Sorry Matt, the links to the plugin should be working again now.
At the moment the plugin only checks the host in the HTTP referer when decided what message to show.
It is possible to extract search terms from the HTTP referer which is what you would need for that feature, but its not something I’ve built into this plugin yet.