Title: Problem/question using filter
Last modified: August 31, 2016

---

# Problem/question using filter

 *  Resolved [Abigailm](https://wordpress.org/support/users/abigailm/)
 * (@abigailm)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/problemquestion-using-filter/)
 * Thank you for this excellent plugin
 * I am trying to prevent the archived posts from showing on the front end — even
   to logged in administrators — so I followed the instructions in the FAQ – and
   put this code, exactly, in my functions.php file:
 *     ```
       function my_aps_default_read_capability( $capability ) {
           $capability = 'read';
   
           return $capability;
       }
       add_filter( 'aps_default_read_capability', 'my_aps_default_read_capability' );
       ```
   
 * But the archived posts still show up. My goal is to have them disappear entirely
   from front-end view– no links, no searches, etc.
 * Is there something else I need to add to the filter to make that happen. My coding
   skills are pretty rudimentary, so I am guessing there might be some basic step
   that I’m missing.
 * [https://wordpress.org/plugins/archived-post-status/](https://wordpress.org/plugins/archived-post-status/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Frankie Jarrett](https://wordpress.org/support/users/fjarrett/)
 * (@fjarrett)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/problemquestion-using-filter/#post-6946180)
 * Hi Abigailm, actually that filter isn’t doing what you think.
 * What the FAQ is describing is that any logged in user with the `read_private_posts`
   capability will be able to see them. This filter _lowers_ that capability so 
   that anyone with the `read` capability (which is basically everyone) can see 
   the Archived content.
 * 1. Remove this code from your `functions.php` file.
    2. Log out of WordPress.
   3. Archived posts won’t be visible.
 * As it says in the FAQ:
 * > **Why are Archived posts appearing on the front-end?**
   >  This is most likely
   > because you are viewing your site while being logged in as an Editor or Administrator.
 * More here on which users have which capabilities: [http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table](http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table)
 *  Thread Starter [Abigailm](https://wordpress.org/support/users/abigailm/)
 * (@abigailm)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/problemquestion-using-filter/#post-6946181)
 * It’s been a while since I posted that comment.
 * I think I got things working the way I want (archived posts not visible on the
   front end to any users, whatever the privilege level) with this code:
 *     ```
       function my_aps_default_read_capability( $capability ) {
           $capability = 'read';
           return $capability;
       }
       add_filter( 'aps_default_read_capability', 'my_aps_default_read_capability' );
       add_filter( 'aps_status_arg_public', '__return_false' );
       add_filter( 'aps_status_arg_private', '__return_false' );
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Problem/question using filter’ is closed to new replies.

 * ![](https://ps.w.org/archived-post-status/assets/icon-256x256.png?rev=3103140)
 * [Archive Content with Archived Post Status](https://wordpress.org/plugins/archived-post-status/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/archived-post-status/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/archived-post-status/)
 * [Active Topics](https://wordpress.org/support/plugin/archived-post-status/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/archived-post-status/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/archived-post-status/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Abigailm](https://wordpress.org/support/users/abigailm/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/problemquestion-using-filter/#post-6946181)
 * Status: resolved