WordPress.org

Ready to get started?Download WordPress

Forums

Adding a link to switch visibility in a post (3 posts)

  1. GerritKuilder
    Member
    Posted 2 years ago #

    Hi All,

    I am trying to add some functionality to have a link on a post so I can switch the the visibility of a post, without the need to edit the whole post.
    I have been googling and trying for an hour or two already but cannot find anything relevant.

    Any help appreciated

  2. Marventus
    Member
    Posted 2 years ago #

    Hi, can you be more specific about what it is you are trying to accomplish?
    Also, are you trying to make the entire post invisible or to make it disappear altogether? I know it sounds like the same thing, but in CSS these are two different things:
    1. visibility:hidden renders the target invisible but still occupying the space it would otherwise occupy in the viewport if it were visible;
    2. display:none makes the entire element disappear from the viewport, so any elements that come after it would occupy the space the disappeared element would have.
    For more detail about this, see w3schools:
    Visibility.
    Display.

  3. GerritKuilder
    Member
    Posted 2 years ago #

    This has nothing to to with css, this has to do with setting the $post->post_status to 'private', many themes have a button/link to edit the post f you are logged in with priviliges high enough.
    I would like to create a link so I d not need to edit the whole post.
    (actualy a link to delete a post would be nice aswell.)
    I have a site where each digital camera picture is a post, needing to edit the whole post for setting the post_status or deleting the post is abit of overkill for this. (I am already using a plugin so I can edit some post data straight from the front page.)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags