Directory / plugin

Kayce Custom Archive Sections

v2.2.1 · by wpkayce

Add reusable content sections before or after posts on any archive page — blog index, categories, tags, authors, search results, and more.

About this plugin

Your theme decides what your blog index, category archives, tag pages and search results look like — and usually gives you nowhere to put your own content on them. Adding a newsletter sign-up beneath your blog feed, a disclaimer at the top of one particular category, or a seasonal banner that retires itself on a set date normally means editing theme files, and losing that work the next time the theme updates.

Kayce Custom Archive Sections turns each of those into an ordinary WordPress post. Write it, publish it once, and tell it which pages it belongs on. Nothing is hard-coded into your theme, so nothing breaks when your theme changes.

Because each section is a regular post, you design it with the block editor (Gutenberg) or Elementor — there is no shortcode syntax to learn and no page-builder lock-in. You choose where it appears, whether it sits above or below the posts, and who gets to see it.

It 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)
  • Front page (static front 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
  • CPT archives — target the archive page of any custom post type
  • CPT singles — target individual posts of any custom post type
  • Custom taxonomy archives — target every term archive of any public custom taxonomy, including WooCommerce product categories and tags
  • Specific terms — target individual terms within any custom taxonomy, with a searchable term picker

Singular locations supported:

  • Single posts
  • All pages
  • Specific pages — target individual pages with a built-in page picker

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
  • Display scheduling — optional From / To date pickers; sections outside their date range are automatically hidden
  • Device visibility — show on Desktop, Tablet, Mobile, or any combination; implemented in CSS, works with all caching setups
  • User role targeting — restrict a section to specific WordPress user roles (e.g. Subscriber, Editor, Administrator)

Admin experience:

  • At-a-glance list table with Active, Location, Position, and Visibility columns
  • Drag-drop reordering — drag the ☰ handle to reorder sections; order saves instantly with no page reload
  • 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 drag-drop or the standard Order field (Page Attributes)

Embedding a section manually:

  • Archive Section block — pick a section from a dropdown and drop it anywhere, including Full Site Editing templates; the content is rendered on page load, so it always reflects the section as it is now
  • [kcas_section id="X"] — the same thing as a shortcode, for classic editor and page builder content

Both respect every display control (scheduling, roles, devices, login state).

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

Plugin tags