WordPress.org

Ready to get started?Download WordPress

Forums

Non Users Delete Posts (1 post)

  1. shamy1000
    Member
    Posted 2 years ago #

    How can I allow non users to delete posts?

    I am currently using this code:

    <?php
      global $wp_query;
      $cat = get_the_category();
    
      if ($cat[0]->cat_ID == 86){
          $url = get_bloginfo('url');
          echo "<a>ID) . "'>Delete post</a>";
     }
    ?>

    This adds a delete link if the current post is in a certain category. It works perfectly but It requires a user with edit privileges to be logged in. How can I change this to allow for regular, non registered users to delete posts?

    Any help is appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic