The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

HideThis..problem with new version of WordPress. (7 posts)

  1. hktvb2001
    Posted 9 years ago #


    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: http://www.edwards.org/tags/Wordpress
    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: http://www.edwards.org

    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; }



  2. MichaelH
    Posted 9 years ago #

    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 http://www.alanwho.com/web-development/wordpress/plugins/protectcontent

  3. marke1
    Posted 9 years ago #

    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....

  4. marke1
    Posted 9 years ago #

    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.

  5. tightarsetours
    Posted 9 years ago #


    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?


  6. noelgreen
    Posted 8 years ago #

    Hey marke1... great plug-in!

    I'm wondering if you could help answer the question I posted here: http://wordpress.org/support/topic/121768?replies=10

  7. I_Love_Techno
    Posted 8 years ago #

    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!!!

Topic Closed

This topic has been closed to new replies.

About this Topic