WordPress.org

Ideas

Implement HIDDEN posts/pages

  1. dejudicibus
    Inactive

    Currently there are three post/page statuses that can be set from the visual interface: published, draft, and pending. From PHP code there are also others, of course, as future or auto-draft, that are set by using other sections of the interface.

    What I propose is a fourth status to add to the first three I mentioned: hidden. A hidden post/page is a content that is not visible. It is "published", but temporary removed from the blog. Differently from other statuses, "hidden" biases other aspect of your blog. For example, if that page is also referenced as an item in any menu, that item is hidden too, automatically. If that page is referenced from a link in another page/post, that link is automatically disabled. In practice, WP takes care of all references to an hidden post/page and disable them. As soon as an hidden post is taken back to publish status, all the references are restored.

    Of course, that could be done by a plug-in too, but if this feature is embedded in WP itself, it can be more efficient.

    Why hidden posts/pages? Many reasons. For example, there is content that should be visible only in some period of the year, or when a specific event occurs, or that should be temporary removed for legal or practical reasons and soon restored when possible. In all cases, to ensure that also any reference, menu, link, to that post/page is disabled could be quite challenging, even because in many cases you cannot simply disable a reference but you have to remove it. If you remove, for example, a menu item, you have to remember which specific style you applied to it or other properties, as soon as you restore it. By using "hidden" feature, it is no more necessary.

    Posted: 9 months ago #
  2. Ipstenu (Mika Epstein)
    Lead Plugin Wrangler

    You mean like Private?

    https://codex.wordpress.org/Content_Visibility#Private_Content

    Posted: 9 months ago #
  3. dejudicibus
    Inactive

    No. Posts and pages in private status can be seen by admin and by authorized users. Furthermore, not all the references are automatically disabled when a post is in private mode: you have to manually remove them. I am speaking of really HIDDEN posts.

    Posted: 9 months ago #
  4. Ipstenu (Mika Epstein)
    Lead Plugin Wrangler

    Those are ... drafts?

    I'm sorry, but if you're talking HIDDEN where NO ONE can see them, then they're drafts.

    Or a custom post status, which you can create via plugins.

    https://codex.wordpress.org/Function_Reference/register_post_status

    Posted: 9 months ago #
  5. dejudicibus
    Inactive

    No, they are not draft either. A draft is an unfinished work. Furthermore, if you change a post from published to draft, all links to that post are broken and the menu related to it takes to nowhere. A hidden post is a PUBLISHED post that, for some specific reason, has to be HIDDEN to ANYBODY. When the post is hidden, the corresponding menu item is hidden too, whereas any link to it is disabled. The post is filtered out from any query, whatever is the reason of the query. For example, you may have posts or pages that are hidden every Sunday, on during Xmas, or from July 20th to August 17th, or every day from 23.00 to 7.00, that is, during the night. The post could be related to a periodical event and should be visible only the week of that event. Not only it has NOT to be confused with a PRIVATE or DRAFT post, but it should be associated to a schedule for publishing. Differently from FUTURE posts, anyway, it is not simply published at a specific date and time, but for a specific period. After that period, it goes back in hidden mode. You can use it for periodical promotions, for frequent events, to have a "night" blog different from a "day" blog, and so forth.

    PS Of course I can use a custom post and create a plugin to take care of all the aspects that I mentioned earlier, but in my opinion, such a key feature would be better part of WP itself rather than implemented as an add-on.

    Posted: 9 months ago #
  6. Ipstenu (Mika Epstein)
    Lead Plugin Wrangler

    I feel like I should point out, I'm being pedantic because I firmly feel that understanding the ultimate meaning for someone's request makes it clear to all involved what the whole situation is.

    For example, you say this:

    A hidden post is a PUBLISHED post that, for some specific reason, has to be HIDDEN to ANYBODY.

    And my first thought is that I would make it a draft or private because if I don't want anyone to see it, then I hide it like that. Otherwise why would it be on my site in the first place? It's either not a page/post,etc.

    BUT! As soon as you gave your example, where you detail out that you want expired posts, then my answer totally changes :)

    And this is kind of the problem here, because you've got an actually very specific need here. I get that it's just an example, but it's an example that points out WHY it's plugin territory.

    Events plugins can do things like that, removing from menus etc, all of which can totally be done with hooks and actions and cron. Expiration plugins can do similar for things that aren't events. They automate removal. And yes, they add in new post statues for you, like a 'hidden' or 'expired' post, and that too would get you closer to your unique situation.

    It's HARD to write a plugin or a feature that does all things for everyone and this is one where people have wildly different needs.

    Posted: 9 months ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    0 Votes
  • Status

    This idea is under consideration