Support » Plugins » HideThis..problem with new version of WordPress.

  • Hi,

    I have seen the plugin code, and it seems quite simple. But, it doesn’t work on the new version of 2.2 WP.
    Does anyone know how to make the code working. I really need that, here’s the code:

    Plugin Name: HideThis
    Plugin URI:
    Description: Hides parts of posts from readers who are not logged in. Begin hidden content with <!–hidethis–> and end hidden content with <!–/hidethis–>
    Version: 1.0.1
    Author: Mark Edwards
    Author URI:

    Copyright © 2006 – Mark Edwards

    Drop it in your plugins dir and activate. Then wrap the text to be hidden with <!–hidethis–> and <!–/hidethis–>

    Example of post with hidden content:

    This is a test post I wrote to see if this plugin works.
    this text will be hidden if a reader isn’t logged in
    And so this is the end of the post.


    add_filter(‘the_content’, ‘hide_some_content’);

    function hide_some_content($content) {
    global $current_user, $user_ID;

    if (($current_user->id == 0) && ($user_ID == 0)){

    $b = strpos($content, ‘<!–hidethis–>’);
    $e = strpos($content, ‘<!–/hidethis–>’);

    $pre = substr($content,0,$b);
    $suf .= substr($content,$e,strlen($content));

    return $pre.$suf;

    } else { return $content; }



Viewing 6 replies - 1 through 6 (of 6 total)
  • Make sure you enter the <!--hidethis--> and <!--/hidethis--> in via the Code tab (or turn off the Visual rich editor in Your Profile).

    Interestingly, that plugin has almost the same exact code as

    Looks like Mr. Alan Who, alleged developer of the Protect Content plugin did nothing more than steal the code for the plugin I wrote (HideThis) at least a half year prior and published it under his own name. He didn’t changed anything except line spacing and the generic ‘hidethis’ tag.

    Oh, and he conveniently deleted the glaringly obvious copyright notice. Gee, I think that’s a federal offense these days…

    Next thing ya know the guy is gonna publish a strangely familiar ‘new blogging platform’ called WhoBlogs….

    Not so surprising, about 5 minutes after I posted a comment to Alan Kay’s (aka Alan Who) blog regarding said plugin he removed the post and the plugin. Go figure.


    I’ve been to your website but it seems the HideThis plugin is no longer there.

    I’m also using WordPress 2.2 and a version of the plugin I found elsewhere doesn’t seem to work.

    Is there a working version available?


    Hey marke1… great plug-in!

    I’m wondering if you could help answer the question I posted here:

    Hello there I’ve developed a plugin very similar to Mark Edwards’one which is compatible with WordPress 2.5. It uses [hide] [/hide] tags to hide a post text zone to unregistered users. This plugin is available on my blog there :


    bye bye!!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘HideThis..problem with new version of WordPress.’ is closed to new replies.