Frequently Asked Questions
Frequently Asked Questions
Isn't this the same as using the Draft or Private statuses?
Actually, no, they are not the same thing.
The Draft status is a "pre-published" status that is reserved for content that is still being worked on. You can still make changes to content marked as Draft, and you can preview your changes.
The Private status is a special kind of published status. It means the content is published, but only certain logged-in users can view it.
The Archived post status, on the other hand, is meant to be a "post-published" status. Once a post has been set to Archived it can no longer be edited or viewed.
Of course, you can always change the status back to Draft or Publish if you want to be able to edit its content again.
Can't I just trash old content I don't want anymore?
Yes, there is nothing wong with trashing old content. And the behavior of the Archived status is very similar to that of trashing.
However, WordPress permanently deletes trashed posts after 30 days (see here).
This is what makes the Archived post status handy. You can unpublish content without having to delete it forever.
Where are the options for this plugin?
This plugin does not (yet) have a settings page. However, there are numerous hooks available in the plugin so you can customize default behaviors.
Many of those hooks are listed below in this FAQ and through the documentation, see the Extending The Plugin section.
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.
By default, any user with the read_private_posts capability will see Archived posts appear on the front-end of your site.
You can change the default read capability by adding this hook to your theme's functions.php file or as an MU plugin:
function my_aps_default_read_capability( $capability ) {
$capability = 'read';
return $capability;
}
add_filter( 'aps_default_read_capability', 'my_aps_default_read_capability' );Can I make Archived posts appear on the front-end for all users?
Yes! Add these hooks to your theme's functions.php file or as an MU plugin:
add_filter( 'aps_status_arg_public', '__return_true' );
add_filter( 'aps_status_arg_private', '__return_false' );
add_filter( 'aps_status_arg_exclude_from_search', '__return_false' );Can I change the status name?
You can change the post status name, the "Archived" string, by adding the code snippet to your theme's functions.php file or as an MU plugin:
This will change the name used in the admin and on the post title label (see below).
How can I edit archived content?
By default archived content is not editable. However, you can change this with a filter
Add this hook to your theme's functions.php file or as an MU plugin:
How to modify or disable the "Archived" label added to the post title
This plugin automatically adds Archived: to the title of archived content. (Note that archived content is only viewable to logged in users with the read_private_posts capability).
You can modify the label text, the separator, whether it appears before or after the title, or disable it entirely.
Follow the examples below, adding the code snippet to your theme's functions.php file or as an MU plugin.
Remove the label
add_filter( 'aps_title_label', '__return_false' );
Place the label after the title
add_filter( 'aps_title_label_before', '__return_false' );
Change the separator
The separator is the string between the "Archived" label and the post title, including spaces. When the label appears before the title, the separator is a colon and space : , if the label is placed after the title it is a dash with spaces on each side -.
You can customize the separator with the following filter:
Can I exclude the Archived status from appearing on certain post types?
Add this hook to your theme's functions.php file or as an MU plugin:
My archived posts have disappeared when I deactivate the plugin!
Fear Not! Your content is not gone it's just inaccessible. Unfortunately, using a custom post status like archive is only going to work while the plugin is active or something else registers the archive status .
If you have archived content and deactivate or delete this plugin, that content will disappear from view. Your content is in the database - WordPress just no longer recognizes the post_status because this plugin is not there to set this post status up.
If you no longer need the plugin but want to retain your archived content:
Activate this plugin
Switch all the archived posts/pages/post types to a native post status, like 'draft' or 'publish'
THEN deactivate/delete the plugin.
Last updated