WP plugin: Welcome Visitor!
- plugin:
- Welcome Visitor!
- version:
- R1
- download:
- welcome-visitor.zip
- source:
- welcome-visitor.php
- source:
- welcome-visitor-editor.php
Hoho, another WordPress 2 plugin: Welcome Visitor! lets you add a welcome message on the sidebar or introductory note to the home page or whatever and wherever the heck you like. You edit the message from within the WordPress administration pages. The plugin sports a healthy selection of customizable options—for a simple message plugin, that is.
Installing Welcome Visitor! requires setting up a subdirectory for it (which needs to be: welcome-visitor) in your wp-content/plugins/ directory. This is because the plugin comes in two files, one being the administration page or what I call the welcome message editor. So either extract ‘welcome-visitor.php’ and ‘welcome-visitor-editor.php’ from the zip file after downloading it, set up the ‘welcome-visitor’ subdirectory on your host site, and upload the files to it, or unzip the welcome-visitor folder with the two files already in it and put that up in wp/contents/plugins/. However you do it, your directory tree for Welcome Visitor! should look just so:
/wp-content
/plugins
/welcome-visitor
+ welcome-visitor.php
+ welcome-visitor-editor.php
Once the plugin is installed and activated under Plugins, go to Options and you’ll find a Welcome subpanel tab. Click it to access the welcome message editor.
That cropped thumbnail above links to a full image of the welcome message editor. If it looks a little familiar, that’s because it uses some bits from the basic (non-ahem-WYSIWYG) WordPress post editor. Making use of pre-existing code in WordPress helped keep the plugin light, but bear in mind your welcome message is not like a regular blog post, and some things won’t work as you may expect. For example, the ‘more’ quicktag (<!--more-->) is useless in the message content. Don’t say I didn’t warn you…
The following describe the (fully working) bits in the welcome message editor:
- Title and Content fields
- If these aren’t self-explanatory, well then GACK!
- Message Status
- Status of message on your blog: ‘Published,’ ‘Title only,’ ‘Content only’ or ‘Private.’ Setting to Title or Content only displays one or the other (guess which is which) and bypasses the HTML Style option (see next). Private is just what you’d think—the message is not displayed publically.
- HTML Style
- When message status is ‘Published’ you have the option to display the message in an unordered list (<ul><li> …), or within a <div> element. Setting to unordered list inserts message content in a nested or child list to the title. With either setting the title is placed in a <h2> header. Also, both the initial <ul> and the <div> element are given the css class
welcome-visitorwhich you can use to style the message. - Display Options
- On home page only: Display message only when on your home blog page. To registered users: Logged in users will see the message. Use content filtering: Run WordPress’ built-in text formatting filters on message title and content.
- Update Message (button)
- I hope this is another obvious bit.
Now that you have your message set up as you like, you need a way to display it on your blog. That’s where the welcome_visitor() function or template tag comes in:
Usage
<?php welcome_visitor('before', 'after'); ?>
Parameters
- before
- (string) HTML or other text which is displayed before the message. There is no default.
- after
- (string) HTML or other text which is displayed after the message. There is no default.
Examples:
<?php welcome_visitor(); ?>
This is the default usage and is recommended when displaying both title and content (‘Published’) from your message.
<?php welcome_visitor('<div class="hello">', '</div>'); ?>
This places the message in a <div> with a custom css class of hello.
![[Welcome Visitor! admin page]](/images/guff/2006/04/welcome-visitor.png)
Author: Kaf Oseo
Categories: WordPress
Comments: (38) · Leave a comment · Comments RSS2
Good idea.
I’d like to see an option to only show it to new visitors.
(Am thinking a simple cookie could do it)
Yes, it would be great if you could make it so it only shows it once for each user.
This is a nifty little plugin. Thanks. :)
This is awesome! One question, is there any way to specify a different message for a logged-in user? So, for example, the new user gets a “please sign up” message and the logged in user gets a “Thanks for signing up, Dan!” message?
Thanks again!
Thanks Kaf for this great plugin,
i’m goint to install it right now
;)
Very nice to have on my blog!
This plugin doesn’t seem to be working on my site. I have uploaded everything exactly how it describes in the instructions, but when I update the message, nothing appears on my site. I didn’t adjust the template tag at all, I’m strictly using
<?php welcome_visitor(); ?>.Looks like it would do a very nice job though. Unfortunate.
My mistake, it works correctly. However, it only works in IE. Nothing ever displays in Firefox. Very weird..
I have a stupid question… after installing the plugin and activating it, what’s the next step? I thought installing, activating it were the only things to do…
thanks,
Laney
you have to insert the code in the sidebar.. so it will call it out…
Anyways this only works in IE…. the plugin is a good tool, if you want to relay a message only to IE user… maybe to suggest that they view the site in another better browser..
Mark and nolawi,
Try the plugin with Firefox 1.5.0.5, the plugin will display correctly. You may update your current version using the update wizard or manually check for updates using extension manager.
Interestingly, I can’t get this plug in to work with I.E., but it works fine with FF.
Ditto Karen’s comment, plugin works fine with FF, but I can’t get it to work at all with IE. Any suggestions?
Landslide! I got the same question the same problem! If anyone could help i will apreciate!
Is it shown only for the first visit of an unique visitor?
Also in the IE7 it is nor working correctly…
Do you have a suggestion to fix it?
I’ve noticed this only shows up if the “www” is typed in the address. Is there a way to force it to work for either address?
http://tingull.com/trading – NOT there
http://www.trading.com/trading – IS there
Hey thanks for the wonderful plugin, just what I was looking for!
Contrary to what everyone’s been saying, the plugin worked flawlessly in IE, FF, Opera.
What you have to do is make sure you set the message status to ‘published’ and insert the function call in the index.php page (at least that’s what I did and it worked)
For demo, check out: http://www.alhome.net
Thanks again!
I can’t get it to work with WordPress 2.1. I successfully installed it and put the function call into the index.php page, but I don’t get anything.
Any suggestions?
hello, thank you for this, it´s exactly what i need, but i cant make it work…
i installed it and copy the code into page.php in my current theme, configures the message in options/Welcome Visitor! but nothing..
is there an specific place in the page.php code where i should put it_?
tank you in advance
sorrry for the bother; i IS working!, when logged in i couldn´t see the welcome message
thanks a lot
I have activated the plugin but when I get to the OPTIONS > WELCOME tab, I got the following message: You do have permission to access this page. Anyone has the same problem? Would appreciate if any kind soul can solve my dilemma.
Henry
I had the same problem as Henry. I got around it by editing the welcome-visitor-editor.php file. Around line 55 you will see this code:
global $user_level;
if ($user_level < 8)
die($no_access_msg);
There seems to be a problem with some 2.1 installs where the admin account doesn’t get the user_level set correctly, so you get an access denied message. Deleting those three lines worked for me.
It works good now, no problems….. Thanks!
Hey man that’s a cool little plugin, I was just thinking of doing something like this a few minutes ago – but then I got it from you. Thanks man! :)
Is it shown only for the first visit of an unique visitor?
Thanks for great plugin, I love wordpress and this plugin I will use in my other blog (wordpress ofcourse) :-)
Also in the IE7 it is nor working correctly…
Do you have a suggestion to fix it?….
I have seroius problem with CSS on IE with this plugin, I can fix it, please write some help
As it was written above: Is it shown only to new visitors, if they weren’t on that site before?
Hi!
Activated this plugin and tried opening Admin Menu item, and told me I did not have permission to view the Admin page.
I AM the Admin… what do you suggest?
Thanks
Peter
Activated the plugin and didn’t had permission
I followed the instructions from wordpress.org and it works now:
“You can fix this without altering any code.
1. Go to the Users page
2. Select your user ID
3. In “Update Selected” area, click “Set the Role of checked users to” and select “Administrator” from the pop-up menu
4. Click the “Bulk Upadate” button.
This also fixed my problem with the Related Posts plugin. ”
full entry here:
http://wordpress.org/support/topic/107823
problem with CSS on IE with this plugin
WordPress: v2.3.1
MySQL: v5.0.45-community-nt
PHP: v4.4.7
Server: Microsoft-IIS/6.0
Nothing could get it to show-up on any page, sidebar, etc.
Regards.
There is a new plugin around with just pretty the same name. It will shown me in my admin plugin list as an newer version instead of Yours.
http://wordpress.org/extend/plugins/welcome-visitors/