PHPackages                             framecreative/post-type-archive-pages - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. framecreative/post-type-archive-pages

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

framecreative/post-type-archive-pages
=====================================

1.2(10mo ago)017PHP

Since Jan 24Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/framecreative/post-type-archive-pages)[ Packagist](https://packagist.org/packages/framecreative/post-type-archive-pages)[ RSS](/packages/framecreative-post-type-archive-pages/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

```
=== Post Type Archive Pages ===
Contributors: darrengrant
Donate link: http://paypal.me/darrenthedev
Tags: archive-pages, post-types
Requires at least: 5.0
Tested up to: 5.3
Requires PHP: 5.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Place the archive pages for your post types in the structure of your content pages. The power of pages and post types combined!

== Description ==

Post Type Archive Pages allows you to select pages from within your content page structure to be the archive pages for your custom post types. This gives you control of the permalink for your archive pages and allows them to be nested under other pages. It also sets the permalink base for single posts of that post type and term archive for the post type's taxonomies.

Once the plugin is installed and activated you'll be able to select the archive page for each of your registered post types under Settings > Reading.

== Templating ==

WordPress will look for archive page templates for the pages that you set as archive pages. So *archive-$posttype.php* and *archive.php* will be used rather than *page.php*.

There are also a few functions available that may be helpful in building themes. They are accessed on the plugin's main instance, which is returned by a call to *post_type_archive_pages()*.

= get_archive_page =

Returns the page object for the archive page of the provided post type slug. If called from a post type archive template, a singular template or a term archive and a slug isn't provided, the relative post type will be used. e.g.

`
$page = post_type_archive_pages()->get_archive_page('book');
`

= get_archive_page_post_type =

Returns the post type object that the provided page ID is the archive page for. e.g.

`
$postType = post_type_archive_pages()->get_archive_page_post_type(5);
`

== Menu - Enhancements ==

Archive pages added to the menu will be marked as the current menu item when viewing the post type archive and the current menu item's parent / ancestor when viewing a post of that type. The related CSS classes will also be applied.

== Advanced Custom Fields - Enhancements ==

This plugin is particularly effective when paired with [Advanced Custom Fields](https://www.advancedcustomfields.com/). It registers additional *page type* location rules allowing you to add fields to all archive pages or the archive page for a particular post type. So if your listing page requires content like a description or header image you can place fields for those on the archive page itself.

To access fields like these in your archive template you need only call
`
$desc = get_field( 'description', post_type_archive_pages()->get_archive_page() );
`

== Developer Hooks ==

The plugin attempts to set defaults that should work best for most scenarios. But there are some places to hook in and alter these defaults where needed.

= Filter - post_type_archive_pages/supported_post_types =

By default you will be able to set an archive page for any public post type other than the built in post types of *page* and *post*. This hook allows you to filter the default array of supported post types to add or remove. The array should contain slugs of valid post types. Please note that the array keys are not important in it's use, but contain the slugs to allow you to easily unset values.

`
add_filter( 'post_type_archive_pages/supported_post_types', function( $post_types ){
    unset( $post_types['book'] );
    return $post_types;
} );
`

= Filter - post_type_archive_pages/taxonomy_post_type =

By default taxonomy term archives will inherit the archive page permalink structure of a post type if that post type is the only one that the taxonomy is registered on. For instance if you had a *publisher* taxonomy the permalink for a term archive might become */books/publisher/penguin*. With */books* being the permlaink of the archive page, *publisher* the taxonomy slug and *penguin* the term slug. This filter allows you to alter the post type who's archive page permalink structure will be inherited for a given taxonomy.

`
add_filter( 'post_type_archive_pages/taxonomy_post_type', function( $post_type, $taxonomy ){
    if ( $taxonomy === 'publisher' ) return null;
    return $post_type;
}, 10, 2 );
`

== Screenshots ==

1. Archive pages can be selected under the reading settings.
2. Archive pages are denoted on the pages table view.
3. Why paired with ACF you can add field groups to archive pages.
4. Archive page with an ACF field group.
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance54

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~208 days

Total

2

Last Release

317d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0aa72f116f5374b54c5f58eb5dfa808a5d7c76114a6db4e4b1507641f57ed1f0?d=identicon)[framecreative](/maintainers/framecreative)

---

Top Contributors

[![aj-adl](https://avatars.githubusercontent.com/u/3295954?v=4)](https://github.com/aj-adl "aj-adl (1 commits)")[![KLanger98](https://avatars.githubusercontent.com/u/85721194?v=4)](https://github.com/KLanger98 "KLanger98 (1 commits)")

### Embed Badge

![Health badge](/badges/framecreative-post-type-archive-pages/health.svg)

```
[![Health](https://phpackages.com/badges/framecreative-post-type-archive-pages/health.svg)](https://phpackages.com/packages/framecreative-post-type-archive-pages)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[mediawiki/maps

Adds various mapping features to MediaWiki

84152.3k3](/packages/mediawiki-maps)[starcitizentools/citizen-skin

A beautiful, usable, responsive MediaWiki skin with in-depth extension support. Originally developed for the Star Citizen Wiki.

3376.6k](/packages/starcitizentools-citizen-skin)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

19251.4k3](/packages/civicrm-civicrm-drupal-8)[altis/core

Core module for Altis

19228.0k3](/packages/altis-core)[pfefferle/wordpress-activitypub

The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.

5721.7k4](/packages/pfefferle-wordpress-activitypub)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
