Title: Kayce Custom Archive Sections
Author: wpkayce
Published: <strong>May 19, 2026</strong>
Last modified: May 22, 2026

---

Search plugins

![](https://ps.w.org/kayce-custom-archive-sections/assets/banner-772x250.png?rev
=3538260)

![](https://s.w.org/plugins/geopattern-icon/kayce-custom-archive-sections_b9c3f5.
svg)

# Kayce Custom Archive Sections

 By [wpkayce](https://profiles.wordpress.org/wpkayce/)

[Download](https://downloads.wordpress.org/plugin/kayce-custom-archive-sections.1.1.1.zip)

 * [Details](https://wordpress.org/plugins/kayce-custom-archive-sections/#description)
 * [Reviews](https://wordpress.org/plugins/kayce-custom-archive-sections/#reviews)
 *  [Installation](https://wordpress.org/plugins/kayce-custom-archive-sections/#installation)
 * [Development](https://wordpress.org/plugins/kayce-custom-archive-sections/#developers)

 [Support](https://wordpress.org/support/plugin/kayce-custom-archive-sections/)

## Description

**Kayce Custom Archive Sections** lets you create and manage reusable content areas
that appear automatically before or after the post loop on your WordPress archive
pages — no theme file editing required.

Each section is a regular WordPress post, so you can design it with the **block 
editor (Gutenberg)** or **Elementor**, publish it once, and it shows up exactly 
where you set it.

The plugin works with both **classic PHP themes** and modern **Full Site Editing(
FSE) / block themes** like Twenty Twenty-Five — out of the box, with no extra configuration.

**Archive locations supported:**

 * Blog index (Posts page)
 * All category archives
 * Specific category archives — target individual categories with a built-in category
   picker
 * Tag archives
 * Author archives
 * Search results pages
 * Date archives

**Display controls:**

 * **Before or after** the post loop — per section
 * **Active / Inactive toggle** — publish a section without displaying it yet
 * **Visibility by login state** — show to everyone, logged-in users only, or logged-
   out visitors only

**Admin experience:**

 * At-a-glance list table with Active, Location, Position, and Visibility columns
 * One-click **Duplicate** action to clone any section as a draft
 * **Preview link** in the meta box that jumps straight to the relevant archive 
   page
 * Display order controlled via the standard **Order** field (Page Attributes)

**Performance & security:**

 * **Transient caching** — sections are cached per location, position, and login
   state; cache is busted automatically when a section is saved or the plugin is
   deactivated
 * Admin CSS and JavaScript load **only on the Archive Sections edit screen** — 
   zero frontend asset overhead
 * All inputs validated against whitelists; category IDs cast with `absint()`; nonces
   verified with `sanitize_key()`
 * Works with all standard caching plugins

**For developers:**

 * `kcas_query_args` — filter the WP_Query args before sections are fetched
 * `kcas_section_html` — filter the HTML of an individual section
 * `kcas_sections_html` — filter the complete output wrapper HTML
 * `kcas_before_sections` — action fires before the sections wrapper is output
 * `kcas_after_sections` — action fires after the sections wrapper is output
 * Sections are wrapped in `<section class="kcas-archive-section" id="kcas-section-{
   ID}">` and `<div class="kcas-archive-sections kcas-archive-sections--{before|
   after}">` for easy CSS targeting

**Perfect for:**

 * Hero banners or intro text above your blog feed
 * Promotional blocks, CTA banners, or newsletter sign-ups below posts
 * Category-specific messaging (e.g. a disclaimer on a legal advice category)
 * Showing different content to logged-in members vs. public visitors
 * Search results page enhancements

## Installation

**From the WordPress Plugin Directory**

 1. Go to **Plugins  Add New** in your WordPress admin.
 2. Search for **Kayce Custom Archive Sections**.
 3. Click **Install Now**, then **Activate**.

**Manual Installation**

 1. Download the plugin ZIP file.
 2. Go to **Plugins  Add New  Upload Plugin**.
 3. Upload the ZIP and click **Install Now**, then **Activate**.

**Getting Started**

 1. After activation, go to **Archive Sections  Add New** in the admin menu.
 2. Write or design your section content using the block editor or Elementor.
 3. In the **Archive Section Settings** meta box on the right, configure:
 4.  * **Location** — choose which archive page(s) to target. Selecting _Specific Categories_
       reveals a category picker.
     * **Position** — before or after the post loop.
     * **Active** — tick to enable the section immediately.
     * **Visibility** — show to everyone, logged-in users only, or logged-out visitors
       only.
 5. Click **Publish**.
 6. Visit the matching archive page — your section will appear automatically.

**Tip:** Use the **Order** field (Page Attributes panel) to control display order
when multiple sections share the same location and position. Lower numbers appear
first.

## FAQ

### Does this work with any theme?

Yes — including Full Site Editing (block) themes like Twenty Twenty-Five. The plugin
automatically detects whether your active theme is a classic or block theme and 
uses the correct rendering pipeline for each.

### Can I use Elementor to design my sections?

Yes. The Archive Section custom post type has `show_in_rest` enabled, making it 
fully compatible with the block editor. Elementor also supports editing custom post
types, so you can build sections visually with Elementor as well.

### Can I target a specific category page?

Yes. Set the location to **Specific Categories**, then tick the categories you want
in the category picker that appears below. The section will only display on those
category archives.

### Can I show different content to logged-in and logged-out users?

Yes. Each section has a **Visibility** setting: _Everyone_, _Logged-in users only_,
or _Logged-out visitors only_.

### How do I temporarily disable a section without deleting it?

Uncheck the **Active** checkbox in the meta box and update the post. The section
will be saved but will no longer display on the front end.

### How do I control the order of multiple sections?

Set the **Order** value in the Page Attributes panel (lower numbers appear first).
Sections with the same order value are sorted alphabetically by title.

### Will the sections appear on the front end straight away?

Yes — as soon as you publish an active section with a location and position set,
it will appear on the matching archive page. The transient cache is cleared automatically
on save.

### Does the plugin add any database tables?

No. The plugin uses WordPress’s standard `wp_posts`, `wp_postmeta`, and `wp_options`
tables only.

### Will it slow down my site?

No. Sections are cached in transients after the first load, so subsequent page views
skip the database query entirely. The cache is split by location, position, and 
login state to ensure visitors always see the correct content. Admin assets (CSS/
JS) are only loaded on the Archive Sections edit screen.

### What happens when I delete the plugin?

The included `uninstall.php` permanently deletes all Archive Section posts and their
meta data when the plugin is removed from **Plugins  Installed Plugins  Delete**.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Kayce Custom Archive Sections” is open source software. The following people have
contributed to this plugin.

Contributors

 *   [ wpkayce ](https://profiles.wordpress.org/wpkayce/)
 *   [ Rohit ](https://profiles.wordpress.org/rohitkc32/)

[Translate “Kayce Custom Archive Sections” into your language.](https://translate.wordpress.org/projects/wp-plugins/kayce-custom-archive-sections)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/kayce-custom-archive-sections/),
check out the [SVN repository](https://plugins.svn.wordpress.org/kayce-custom-archive-sections/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/kayce-custom-archive-sections/)
by [RSS](https://plugins.trac.wordpress.org/log/kayce-custom-archive-sections/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.1.1

**Bug fixes**

 * Fixed sections with the Single Post location not appearing on FSE / block themes—
   the render_block filter now targets `core/post-content` in addition to `core/
   query`.
 * Fixed After Header and Before Posts positions on FSE singular pages injecting
   between the featured image and post body. Both positions now inject after the
   header template part, before the post title and featured image.
 * Fixed section design breaking on every other page load. WordPress generates dynamic
   layout class names (`wp-container-*-is-layout-N`) that increment globally; caching
   rendered HTML caused class/CSS mismatches on subsequent requests. The cache now
   stores raw section data and blocks are rendered fresh on each request.
 * Fixed post content disappearing after sections were rendered — missing `wp_reset_postdata()`
   call after the section rendering loop.
 * Fixed stale section output after switching themes — cache is now busted automatically
   on `switch_theme`.
 * Fixed After Header sections on classic themes with a sidebar (e.g. ColorMag) 
   remaining inside the primary content column. The JS repositioner now loops until
   stable, correctly lifting the section to full-width outside the columns row.

#### 1.1.0

**New positions**

 * Added **After header** (`before_content`) position — injects the section between
   the site header and the page content area, outside the posts grid.
 * Theme-specific hook cascade fires in the structurally correct location for Astra,
   Genesis Framework, OceanWP, Kadence, Neve, WooCommerce Storefront, Hestia, ColorMag,
   Blocksy, Hello Elementor, Divi, and Enfold.
 * JavaScript safety net automatically repositions sections that land inside a posts-
   loop container on unsupported classic themes (detects `article` siblings, moves
   section before the grid with no page reload).
 * Position field in the meta box is now hidden when Location is set to Disabled—
   no confusing options for inactive sections.
 * Visibility options now display one option per row for full readability in the
   narrow sidebar meta box.

**New features**

 * **Quick Edit** — update Active, Position, and Visibility directly from the list
   table without opening the edit screen.
 * **Bulk actions** — activate or deactivate multiple sections at once from the 
   list table.
 * **Sortable columns** — Active, Location, Position, and Visibility column headers
   are all sortable.
 * **Settings page** (Archive Sections  Settings) — configure transient cache expiry(
   0–168 hours); set to 0 to disable caching entirely.
 * **Activation welcome notice** — a one-time admin notice appears after activation
   with a direct link to create the first section.
 * **Single post support** — sections can now target individual post pages (`is_single()`),
   not just archive pages.

**Admin UI redesign**

 * Archive Section Settings meta box fully redesigned: CSS toggle switch for Active
   state, two-column Dashicon card grid for Location, segmented button groups for
   Position and Visibility, styled category search with a leading icon, and a full-
   width Preview button.
 * Category list items show a post-count badge; checked items are highlighted in
   blue.
 * Friendly empty-state card with a Create CTA shown when no sections exist yet.

**Dynamic block context fixes**

 * On single posts and static pages: dynamic blocks (`core/post-title`, `core/post-
   excerpt`, `core/post-featured-image`, etc.) now correctly resolve against the
   viewed post rather than the section post itself.
 * On archive pages (category, tag, author, search, date): post-specific blocks 
   return empty rather than showing the section’s own data; archive-aware blocks(`
   core/archive-title`, `core/term-description`) are unaffected.
 * Cache for the `single_post` location now includes the viewed post ID in the cache
   key, so each post gets its own cached copy.

**Bug fixes**

 * FSE / block themes: fixed duplicate section injection on pages that render multiple
   Query Loop blocks with `inherit: true`.
 * Cache: `single_post` was missing from the locations list used during cache bust
   and `uninstall.php` cleanup.
 * Frontend assets now enqueued only on archive and singular pages — zero overhead
   on all other pages.

**Developer / i18n**

 * All user-facing strings wrapped in the `kayce-custom-archive-sections` text domain.
 * Added `languages/kayce-custom-archive-sections.pot` template for translators.
 * Full CPT label set: `archives`, `attributes`, `items_list`, `items_list_navigation`,`
   filter_items_list`, and more.
 * New frontend script (`frontend.js`) enqueued only on relevant pages; sections
   expose `kcas-archive-sections--before_content` class for custom CSS targeting.

#### 1.0.0

 * Initial release.
 * Custom post type (`kcas_section`) for creating reusable archive sections.
 * Display sections before or after posts on the **blog index** and **category archive**
   pages.
 * Support for **specific category targeting** with a scrollable category picker.
 * Additional archive locations: **tag archives**, **author archives**, **search
   results**, **date archives**.
 * Per-section **Active / Inactive toggle**.
 * Per-section **login-state visibility** control (everyone / logged-in / logged-
   out).
 * Admin list table columns: Active, Location, Position, Visibility.
 * **Duplicate / Clone** row action with nonce and capability checks.
 * **Preview link** in the meta box resolving the real archive URL per location 
   type.
 * **Transient caching** with version-stamped keys; login state included in cache
   key; targeted per-location cache busting on save.
 * Admin CSS and JS enqueued only on the Archive Section edit screen (zero front-
   end overhead).
 * Full compatibility with **classic themes** (loop_start / loop_end pipeline) and**
   FSE / block themes** (render_block filter pipeline).
 * Fully compatible with **Gutenberg** and **Elementor**.
 * Developer hooks: `kcas_query_args`, `kcas_section_html`, `kcas_sections_html`,`
   kcas_before_sections`, `kcas_after_sections`.
 * `uninstall.php` for clean removal.

## Meta

 *  Version **1.1.1**
 *  Last updated **1 week ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **7.0**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [archive](https://wordpress.org/plugins/tags/archive/)[blog](https://wordpress.org/plugins/tags/blog/)
   [category](https://wordpress.org/plugins/tags/category/)[gutenberg](https://wordpress.org/plugins/tags/gutenberg/)
 *  [Advanced View](https://wordpress.org/plugins/kayce-custom-archive-sections/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/kayce-custom-archive-sections/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/kayce-custom-archive-sections/reviews/)

## Contributors

 *   [ wpkayce ](https://profiles.wordpress.org/wpkayce/)
 *   [ Rohit ](https://profiles.wordpress.org/rohitkc32/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/kayce-custom-archive-sections/)