
外掛標籤
開發者團隊
② 後台搜尋「ArchticFrame – Editable Archive Pages」→ 直接安裝(推薦)
原文外掛簡介
ArchticFrame provides a structured way to build content-managed archive pages for custom post types.
Normally, WordPress archive pages are controlled entirely by theme templates.
This makes it difficult for editors to manage archive content or layouts without modifying theme files.
ArchticFrame solves this by introducing Archive Pages.
An Archive Page is an internal content object that represents the archive content for a custom post type.
Editors can build archive layouts using:
Gutenberg blocks
Advanced Custom Fields (ACF)
custom metadata
reusable blocks
These Archive Pages are automatically linked to their corresponding custom post type archives.
The archive content can then be rendered within archive templates using simple helper functions.
Archive Pages behave like editable landing page content while still allowing the archive to display its normal post listings.
Key Concepts
ArchticFrame introduces a dedicated internal post type:
Archive Pages
Each Archive Page represents the content for a specific custom post type archive.
Examples:
Projects → Archive Page
Services → Archive Page
Events → Archive Page
Archive Pages are automatically managed by the plugin and are intended to act as content sources for archive layouts.
Features
Dedicated Archive Page for each enabled custom post type
Gutenberg block support for archive layouts
Compatible with Advanced Custom Fields (ACF)
Automatic archive page creation and management
Archive Pages stored in a dedicated admin section
Automatic linking between Archive Pages and post type archives
Template override support for themes
Simple helper functions for theme developers
How It Works
Activate the plugin
Navigate to Archive Pages → Settings
Enable archive management for a custom post type
ArchticFrame automatically creates an Archive Page
Edit the Archive Page using Gutenberg or ACF
Render the archive content inside your archive template
The archive content can be placed above the post listing or anywhere within your archive layout.
Archive Pages Admin
ArchticFrame adds a new admin section:
Archive Pages
This section lists all Archive Pages managed by the plugin.
Each Archive Page corresponds to a specific custom post type archive.
Archive Pages include a View Archive link which opens the actual archive URL.
Editors manage the content of these pages, while archive relationships are handled automatically.
Template Loading
When archive management is enabled for a custom post type, ArchticFrame attempts to load templates in the following order:
archtic-{post_type}.php in the active theme
archtic.php in the active theme
the plugin fallback template
Examples:
archtic-projects.php
archtic-services.php
archtic.php
This allows theme developers to fully customise archive layouts while maintaining a safe fallback.
Content Sanitization
The plugin fallback template outputs archive content using standard WordPress sanitization.
This helps provide a safe default, but some custom markup may be altered or removed depending on how it is rendered. This can affect advanced custom HTML added through blocks, ACF output, or inline markup.
If you need full control over archive output, you can override the fallback template using archtic.php or archtic-{post_type}.php in your theme.
In cases where specific markup needs to be allowed, developers can also extend the permitted HTML using standard WordPress filters such as wp_kses_allowed_html.
Helper Functions
ArchticFrame provides helper functions for theme developers.
Output archive content:
Get the archive object ID:
$post_id = archticframe_id();
Get the archive title:
echo archticframe_title();
Retrieve an ACF field from the archive:
echo archticframe_field(‘subtitle’);
These helpers allow themes to integrate archive content without directly querying the archive object.
Archive Listings Shortcode
ArchticFrame includes a shortcode that allows archive listings to be displayed directly inside Archive Pages.
This allows editors to build custom archive layouts using Gutenberg blocks while still displaying the posts from the archive.
The shortcode automatically detects the current archive post type when used inside an ArchticFrame Archive Page.
Basic Usage
[archtic_listing]
This will output the archive posts for the current custom post type.
Shortcode Attributes
posts_per_page
Controls how many posts are displayed.
Default: 12
Example:
[archtic_listing posts_per_page=”6″]
show
Controls which elements appear for each listing item.
Available options:
image
title
excerpt
content
button
Default:
image,title,excerpt,button
Example:
[archtic_listing show=”image,title,button”]
button_text
Changes the label used for the button when the button option is enabled.
Default:
Read more
Example:
[archtic_listing button_text=”View project”]
link
Controls how items link to their individual posts.
Available values:
button – only the button links to the post
card – the entire item card is clickable
both – card and button both link to the post
none – no links are generated
Default:
button
Example:
[archtic_listing link=”card”]
HTML Structure
The shortcode outputs the following structure to allow flexible styling:
Themes can style the archive listings using the following classes:
.archtic-listings
.archtic-wrap
.archtic-grid
.archtic-col
.archtic-item
.archtic-item__image
.archtic-item__title
.archtic-item__excerpt
.archtic-item__content
.archtic-item__actions
.archtic-item__button
License
This plugin is licensed under the GPLv2 or later.
See: https://www.gnu.org/licenses/gpl-2.0.html
