# Custom Wording for Archive Titles

> Rewrites archive headings with your own wording, such as "Articles by Jane" on author pages or "Posts from March 2026" on monthly archives.

- Type: PHP
- Runs: Run everywhere
- Category: [Archives](https://wpide.com/library/category/archive/)
- Tags: archives, titles, wording
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/custom-archive-title-wording/

## Code

```php
// Title templates. %s is replaced with the term, author or date.
$wpide_archive_titles = array(
    'category' => '%s',
    'tag'      => 'Posts tagged "%s"',
    'author'   => 'Articles by %s',
    'year'     => 'Posts from %s',
    'month'    => 'Posts from %s',
    'day'      => 'Posts from %s',
);

add_filter( 'get_the_archive_title', function ( $title ) use ( $wpide_archive_titles ) {
    if ( is_category() ) {
        return sprintf( $wpide_archive_titles['category'], single_cat_title( '', false ) );
    }

    if ( is_tag() ) {
        return sprintf( $wpide_archive_titles['tag'], single_tag_title( '', false ) );
    }

    if ( is_author() ) {
        return sprintf( $wpide_archive_titles['author'], get_the_author_meta( 'display_name', get_queried_object_id() ) );
    }

    if ( is_day() ) {
        return sprintf( $wpide_archive_titles['day'], get_the_date() );
    }

    if ( is_month() ) {
        return sprintf( $wpide_archive_titles['month'], get_the_date( 'F Y' ) );
    }

    if ( is_year() ) {
        return sprintf( $wpide_archive_titles['year'], get_the_date( 'Y' ) );
    }

    return $title;
}, 20 );
```

## Notes

Edit the templates at the top; %s is replaced with the name or date.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Custom Wording for Archive Titles" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
