This plugin is designed for Wordpress 1.5 and later (although it might work earlier versions.) It lets you hide parts of posts from readers who are not logged in. No template modifications are required.
HideThis v1.0.1
Description
This plugin is designed for Wordpress 1.5 and later (it might actually work with earlier version too). This plugin lets you hide parts of posts from readers who are not logged in. No template modifications are required.
Revision History:
1.00 (March 12, 2006)
- Initial release
1.01 (March 14, 2006)
- Fixed bug where it wouldn’t work right with WP 1.5.x
INSTALLATION:
Drop it in your plugin directory (in wp-content/plugins or a sub-folder if you prefer) and active it. That’s it!
See the readme file for info on how to use it — it’s really simple.
Please donate to help support plugin development! YOUR support is appreciated!
If you have any suggestions for improvements or comments about this plugin then please post them in response to this post. Note that all comments are moderated.
If you want to stay informed of new plugins and bug fixes then either subscribe to the RSS feed for comments of this post, subscribe to email notices for new comments to this post (see option near comment form below), or subscribe to this site’s RSS feed.
Tags: Blogs, Plugins, Wordpress
Add to: Blogarithm | | Digg it | FURL | Pluck | Rojo | Simpy This! | Spurl
(Ref ID: 19595)
| 






38 comments
Comments feed for this article
May 26th, 2007 at 6:19 am
Pingback from WP Plugins DB » Plugin Details » HideThis -
June 15th, 2007 at 10:44 am
Pingback from The-A-TEAM » Changing things again -
September 18th, 2007 at 9:58 am
Pingback from An Idea For Amember + Wordpress | Automate Your Business -
April 23rd, 2008 at 7:05 pm
Pingback from hidethis info -
March 13th, 2006 at 12:12 am
Mew
You’re awesome~ Thanks!
March 13th, 2006 at 1:15 am
Will
Hey,
Nice idea, however it’s not working for me with wp 1.5.2.
I added this to a post:
Logged In Users Only Should See This
But both logged in and not loged in users can NOT see it.
Well, just one request as well at the moment…
Perhaps you could add a quick tag in admin cp ?
Thanks,
Will
March 13th, 2006 at 6:52 pm
Fred
Make sure you use the right syntax to wrap the hidden text. See the readme file for instructions.
Due to the character encoding used in this blog my previously posted usage example was mangled so I had to remove it.
If after you read the intructions you still have problems with it then please let me know.
March 14th, 2006 at 4:19 pm
Orlando
Same happens to me as Will up there, using WP 1.5.2.
hidethis (of course, with de code stuff as in the readme text)
This text should only be read by resgistred readers.
/hidethis
Nobody can read it, not even the main admin… :~((
March 14th, 2006 at 4:36 pm
Orlando
It works perfectly in another weblog of mine using WP 2.0.1 (http://www.sinais.letrascomgarfos.net/)
March 14th, 2006 at 4:44 pm
Fred
Hi Orlando, do a test for me on WP 1.5.x (I don’t have a copy installed to test with). Open the plugin PHP source code file and change this:
if ($current_user->id == 0) {
To this :
echo ‘WP ver: [’ . $wp_version . ‘] ‘;
echo ‘IDs: [’ . $current_user->id . ‘ — ‘ . $current_user->ID . ‘]’;
if ($current_user->id == 0) {
Then try the plugin with a post again and look at the post on your blog. You should see something like this somewhere in your post:
WP ver: [1.5.2] IDs [ 1 - 1 ]
Could be different numbers, but that’s basically what to look for. Post your results here and maybe I can change the plugin based on your results.
March 14th, 2006 at 4:59 pm
Orlando
Thks Fred. I followed strictly yr instructions.
I’m afraid I got a funny echo response:
WP ver: [] IDs: [ — ]
But I can assure that the WP version is 1.5.2.
Thks.
March 14th, 2006 at 5:07 pm
Fred
Thanks for you help Orlando, I’ll download a copy of WP 1.5.x and do some tests and post my results, hopefully in the next 24 hours.
March 14th, 2006 at 5:37 pm
Fred
I released a new version, v1.0.1, that is fixed to work with Wordpress 1.5.x and possibly earlier versions of Wordpress too
March 14th, 2006 at 5:44 pm
Orlando
Perfect! Works fine with WP 1.5.2!
March 15th, 2006 at 2:51 am
Will
Hello,
Nice one! Works great now.
Thanks again,
Will
PS: You forgot to update version number in the file.
March 15th, 2006 at 2:56 am
Will
Hey,
Sorry, forgot one other thing.
It creates a blank line before the text, is there anyway to stop it from creating the blank line?
Thanks,
Will
March 15th, 2006 at 12:34 pm
Fred
Try changing the way you format the post. You can maybe put the beginning wrapper tag
< ! --hidethis-->for the paragraph(s) you want to hide on the same line as the preceding paragraph, then manually insert a paragraph break< p >after the opening wrapper tag. Then write your hidden text, insert a close paragraph tag< /p >and then the closing wrapper tag, which is, as you know, this:< ! --/hidethis-- >Note that I had to insert spaces in those tags in order to get them to show up in this comment reply. In reality you don’t use spaces when using the plugin.
Fixed, thanks.
March 18th, 2006 at 7:26 pm
Rocky2889
I like to make a request for an option that on the hidden area that show password box with wording something like this “Please enter password to see the hidden entry” Which is almost similar to the WP default password protect post but this one allow curious one read to see part of the post with password.
March 19th, 2006 at 2:30 am
Will
Thanks buddy.
March 31st, 2006 at 8:07 pm
Mew
Hey. I finally got around to installing this and so far it’s not working. I’ve wrapped the content with the correct tags but the content within the tags are still visible to users who are not logged in. I’m using WP 2.0.2. Any ideas?
If you want to check it, my site is http://as.crosswithyou.net The two torrent links in the post should be hidden. You can see the tags if you view source.
PS What’s up with your site? It’s like it’s spazzing out whenever a page is loaded. I have to press Esc to make it stop.
April 1st, 2006 at 10:31 pm
Aleister
This plugin works fine with WordPress 2.x.
The problem is that in the plugin’s description on the plugin page, the code you surround your data in is not displayed properly. At least not in WP 2.x.
It shows a single dash where two dashes should be. The readme file shows it as two dashes
Just make sure you use two dashes, and it will work.
April 1st, 2006 at 11:30 pm
Mew
Yes, I did notice that, and I /am/ using two dashes. It’s still not working for me. =(
April 3rd, 2006 at 1:13 am
Someonesexgf
A password box above or beneath the protected area would be a great addition.
April 16th, 2006 at 9:09 pm
Dave
I’ve adapted the code slightly into more of a ’showthis’ plugin. It now only shows the message only if you are a non-registered viewer (public). However, I’ve noticed that this only works within the post, using the the_content Plugin API filter.
However, I want to use this functionality in the sidebar. That way, I can tell the public that there is more to be seen, and they can see it if they register, without bothering my registered users with this - to them - irrelevant information.
I couldn’t find any other relevant filters though, so my question is whether you know of a way to do this?
April 16th, 2006 at 10:54 pm
Mew
(Just wanted to say I don’t know what I did but the plugin works now. Thanks!)
April 25th, 2006 at 4:17 pm
Militantplatypus
I just grabbed this code, and I am using it with great success on my blog. I added to it, so that it shows an image that lets readers know they are missing something, and then takes the image away when they are logged in.
Basically, I copied the existing function, and reversed it. So it works out like this:
for non-logged in users
for logged in users
If anyone wants the code, drop me a comment on my blog.
April 25th, 2006 at 7:54 pm
Jason
I am using version 2 of WordPress and this is not working for me. I am trying to hide all categories and stuff on the sidebar unless you are logged in. I already disable posts from showing unless you are logged in. Check my site and see if you can help me.
http://blog.direplenish.com
May 25th, 2006 at 11:40 am
Evan
Hidethis works great but does it prevent google from indexing the hidden content? If so, does anyone know how to let the google indexer around the login restriction so it can index the content?
June 7th, 2006 at 6:00 am
PurpleRain
This is the one i appreciate. Where is the file? I cannot download
September 16th, 2006 at 10:31 pm
Lyn
This seems like just the plugin I needed, but I can’t download it. Someone fix it, please?
October 19th, 2006 at 6:36 pm
GrafZahl
A plugin I long was looking for.
October 30th, 2006 at 12:53 pm
Militantplaypus
I have the modified version of this plugin still available, and it works with wp2.0x
If you are interested, please visit my site, I have posted a link to it in the side bar under ‘Other Stuff’
October 30th, 2006 at 1:08 pm
Fred
EVERYONE IS STRONGLY ADVISE TO NOT DOWNLOAD MY CODE FROM UNKNOWN THIRD-PARTIES. YOU RUN THE RISK OF SERIOUS SECUIRTY VIOLATIONS. YOU’VE BEEN WARNED.
Also note, no one is authorize to provide download links for my code.
October 30th, 2006 at 1:51 pm
Andrea
Hi,
I’d like to modify this code (with no necessary skills, and rights…ehehe) to edit this hiding options trough the admin panel for all my users….any ideas???
tks
October 30th, 2006 at 1:58 pm
Fred
Hi Andrea,
I’m sure I understand what you mean precisely. You want to be able to manage the plugin settings via the admin panel — seems clear enough. what do you mean by saying “for all my users” ?
November 3rd, 2006 at 3:59 pm
Semih
Hi,
I want to hide some part(download link) in a post even people logged in and after the image code, which is next to the hidden link, entering on textbox it will be seen.
is there any script like that?
November 21st, 2006 at 11:51 am
00schmidt.com
Is it allowed to create another Plugin influenced by HideThis which does the same with some improvements?
This one you might assume a name like HideIt would also hide multiple sections within one post. It would not leave the ending tag within the stripped content and it would provide a configurable Tag to replace the hidden content. The code is completely new.
Your name would certainly appear within the credits. Let me know, if that is ok?
December 5th, 2006 at 4:52 pm
vlp
This plugin - great idea, but I still cannot get it to work. I copied tags from readme file but still see the content.
I use WP 2.0.5
Any ideas what could be wrong?