The MU forums have moved to WordPress.org

how to hide a post completely? (11 posts)

  1. Anonymous
    Unregistered
    Posted 16 years ago #

    i writing a plugin that will hide all posts under selected categories. a list of categories need to hide is stored in option.

    i just wondering which actions and filters will be need to completely hide a post(cos at the moment i just use the content filter, which is a bit primitive. i want to hide the post like private post, which hide the author name, date, content, comment, and postmetadata etc)?

  2. dsader
    Member
    Posted 16 years ago #

    Here's the codex for excluding using a template...
    http://codex.wordpress.org/The_Loop#Exclude_Posts_From_Some_Category

    I have no tips for a plugin, sorry.

  3. Anonymous
    Unregistered
    Posted 16 years ago #

    thanks dsader, using in_category function in loop in template will certainly hide post from user, but it need to modified archive.php, index.php and single.php to hide it completely, another major problem with it will be if the people using RSS feed will be able to see it.

    so i was thinking to use some kind of filters or actions, then it will completely hide from user.

  4. cafespain
    Member
    Posted 16 years ago #

    Use the conditions is_index(), is_home(), is_single(), is_feed() and is_archive() to determine which page type you are on and whether to add the exclusion in your filter or not.

  5. andrea_r
    Moderator
    Posted 16 years ago #

    *scratches head* So why not just mark the post as private?

  6. cafespain
    Member
    Posted 16 years ago #

    or wot andrea sed.

  7. andrea_r
    Moderator
    Posted 16 years ago #

    well, I'm thinking if you have to click a ticky box to change it to a private category, why not just click ticky box that says "private"?

  8. cafespain
    Member
    Posted 16 years ago #

    alternatively, why not save even more time and not write the post in the first place. Particularly as no-one will be able to see or read it once it's written anyway..... :)

  9. rmahfoud
    Member
    Posted 15 years ago #

    I just wrote this plugin that may be another alternative to the situation yu're describing. It essentially allows you to flag a post as “low profile”, and hide it from the homepage and/or from your RSS feed.
    You can download it from here: http://robertmahfoud.konceptus.net/posts/wp-low-profiler/

    Please let me know if you found it useful.

  10. tdjcbe
    Member
    Posted 15 years ago #

    Thanks for that. Have you tested it on the WordPress Multiuser platform yet?

  11. x3r0ss
    Member
    Posted 15 years ago #

    Sorry to bump but it ain't working on WPMU, it hides all posts. How can I fix it ?

About this Topic

  • Started 16 years ago by vitohuang
  • Latest reply from x3r0ss