• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Equalize Digital Home

Equalize Digital

Website Accessibility Consulting, Training, and Development

  • My Account
  • Support
  • Checkout
  • Software
    • Accessibility Checker
      • Features: Accessibility Checker
      • Documentation: Accessibility Checker
      • Buy Accessibility Checker
      • Start Free
    • ArchiveWP
      • Documentation: ArchiveWP
      • Buy ArchiveWP
      • Demo All Plugins
  • Services
    • Accessibility Audits
    • User Testing
    • Accessibility Remediation
    • VPAT & ACR Preparation
    • Accessibility Monitoring
    • Web Accessibility Training
    • Accessibility for Agencies
  • Company
    • About Us
    • Our Team
    • Industry Expertise
    • Accessibility Statement
    • Contact Sales
    • Become An Affiliate
  • Learn
    • Online Courses
    • Accessibility Meetup
    • Articles & Resources
    • Accessibility Craft Podcast
    • Upcoming Events
    • Office Hours
    • Custom Accessibility Training
    • Global Accessibility Awareness Day
  • Contact Sales
  • My Account
  • Support
  • Checkout
Home / ArchiveWP / Documentation / ArchiveWP Developer Guide

ArchiveWP Developer Guide

This guide highlights the primary extension points for developers who want to customize ArchiveWP or integrate archived content into their own workflows.

Templates & Theme Integration

Classic Themes

  • Archived posts use your theme’s single template (single.php / singular.php). ArchiveWP injects the disclaimer notice at the beginning of the content via Frontend::add_archive_notice().
  • Archive Category taxonomy pages reuse your theme’s archive template. In classic themes, Frontend::add_archive_category_disclaimer() outputs the disclaimer just after the loop starts.
  • To adjust the disclaimer markup, use the filters outlined below or call the renderer directly.

To reposition the disclaimer, you can suppress the default markup with CSS or filters and output your own message via \EqualizeDigital\ArchiveWP\Frontend\Helpers::output_archived_content_message() inside the desired template hook.

Block Themes

  • ArchiveWP includes a block template override: templates/block-templates/taxonomy-edawp_archive_category.html.
  • WordPress automatically loads the template when a block theme is active. Editors can customize it via Appearance → Editor → Templates → Archive Category.
  • The template includes the disclaimer block, Query Title, Term Description, and the Archive Loop block.

To override the plugin-provided template, place a file with the same slug (taxonomy-edawp_archive_category.html) inside your theme’s templates/ directory.

Disclaimer Customization

Modify the default disclaimer text by navigating to Settings → ArchiveWP → General. For programmatic changes, use:

  • edawp_archived_content_message – filter the full disclaimer message before output.
  • archivewp_archived_content_message_classes – adjust the wrapper classes (defaults include archivewp-disclaimer).
  • archivewp_archived_content_date_markup – alter or remove the appended date string.

Example — add a custom CSS class:

add_filter(
    'archivewp_archived_content_message_classes',
    static function ( $classes ) {
        $classes[] = 'my-org-archive-notice';
        return $classes;
    }
);

Working with Archived Content Programmatically

Archiving Posts

use EqualizeDigital\ArchiveWP\Backend\Archive\ArchiveService;

$post_id = 123;
$result  = ArchiveService::move_post_to_archive( $post_id );

if ( ! $result ) {
    // Handle failure (post type not permitted, error updating, etc.).
}
  • The service records the original post type (_edawp_original_post_type), archive date (_edawp_archived_date), original permalink, and taxonomy relationships.
  • Hook into the edawp_post_archived action to run follow-up tasks:
add_action(
    'edawp_post_archived',
    static function ( $post_id, $original_post_type ) {
        // Trigger custom logging or notification.
    },
    10,
    2
);

Restoring Posts

use EqualizeDigital\ArchiveWP\Backend\Archive\RestoreService;

$result = RestoreService::restore_post( $archived_post_id );

if ( is_wp_error( $result ) ) {
    // Inspect $result->get_error_message() for details.
}
  • After restoration the service removes ArchiveWP-specific metadata and reassigns any captured taxonomy terms.
  • Listen to the edawp_post_restored action for notifications.

Querying Archived Records

edawp_archived is a public post type without a global archive route. Query it like any other post type:

$query = new \WP_Query( [
    'post_type'      => 'edawp_archived',
    'posts_per_page' => 20,
    'paged'          => max( 1, get_query_var( 'paged' ) ),
    'orderby'        => 'date',
    'order'          => 'DESC',
] );

Use the helper classes documented in docs/archive-rendering-classes.md to output the filter form and loop in templates or custom endpoints.

CLI Utilities

ArchiveWP registers WP-CLI commands (see WP-CLI Commands documentation):

  • wp archivewp migrate-posts <id> [<id> ...]
  • wp archivewp restore-posts <id> [<id> ...]
  • wp archivewp restore-defaults
  • wp archivewp reset-wizard

These commands wrap the same services described above and respect the plugin settings.

Hook Reference (Quick Links)

  • Actions: edawp_post_archived, edawp_post_restored, edawp_license_tab, edawp_first_time_configuration_tab.
  • Filters (selected):
    • edawp_archivable_post_types — extend the list of archivable post types.
    • edawp_preserve_taxonomy_relationships — prevent taxonomy migration for specific cases.
    • archivewp_category_pills_html, archivewp_read_more_html, archivewp_post_dates_html — adjust loop markup.
    • edawp_template_cache_duration — change how long block templates remain cached.

Refer to the hook reference for full signatures and file locations.

Primary Sidebar

ArchiveWP: Take control of your legacy content. Buy ArchiveWP Today.

Starter guide

  • Downloading and Installing ArchiveWP
  • How to Activate Your License Key
  • First-Time Configuration
  • ArchiveWP Settings
  • ArchiveWP Blocks
  • ArchiveWP Shortcodes

General Usage

  • How to Archive a Post
  • How to Archive Posts in Bulk
  • How to Control Which Taxonomy Terms Persist when Posts are Archived
  • How to Restore Archived Posts

FAQs

  • Is ArchiveWP accessible?
  • What languages is ArchiveWP available in?

Developer Docs

  • ArchiveWP Developer Guide
  • ArchiveWP Hooks Reference
  • ArchiveWP WP-CLI Commands

Easier, Faster Accessibility Testing

Equalize Digital Accessibility Checker gives you real-time accessibility feedback in the WordPress editor. Learn accessibility and make fixes earlier in the dev and content creation process. Full-site accessibility scanning without the per page fees.

Get Accessibility Checker

Footer

Equalize Digital Websites for Everyone

Your WordPress accessibility team. Accessibility plugins, rapid audits, and consulting to help you make your website usable by people of all abilities.

  • Facebook
  • GitHub
  • LinkedIn
  • YouTube

Company

  • About Equalize Digital
  • WordPress Accessibility Meetup
  • Accessibility Statement
  • Blog
  • Events
  • Contact Us

Services

  • Accessibility Audits
  • User Testing
  • Remediation
  • Ongoing Monitoring
  • VPAT & ACR Preparation
  • Accessibility Training
  • For Agencies
  • Website Development

Accessibility Checker

  • Features
  • Pricing
  • Documentation
  • How to Get Support
  • My Account
  • Affiliate Dashboard
  • Become an Affiliate

© 2026 Equalize Digital · Privacy Policy · Terms of Service · Software Terms & Refund Policy

International Association of Accessibility Professionals member

Small Business Accessibility Playbook

Learn how to make your website accessible.

Free Ebook: The Small Business Accessibility Playbook for WordPress by Equalize Digital and WP Buffs.

Get a copy of the free e-book via email.

This field is for validation purposes and should be left unchanged.
Name(Required)
This field is hidden when viewing the form
This field is hidden when viewing the form
Privacy Policy(Required)
This field is hidden when viewing the form