Title: Kayce Custom Archive Sections
Author: wpkayce
Published: <strong>19 مايو، 2026</strong>
Last modified: 13 أكتوبر، 2026

---

البحث عن الإضافات

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

![](https://ps.w.org/kayce-custom-archive-sections/assets/icon-256x256.png?rev=3642812)

# Kayce Custom Archive Sections

 بواسطة [wpkayce](https://profiles.wordpress.org/wpkayce/)

[تنزيل](https://downloads.wordpress.org/plugin/kayce-custom-archive-sections.2.1.0.zip)

 * [تفاصيل](https://ar.wordpress.org/plugins/kayce-custom-archive-sections/#description)
 * [المراجعات](https://ar.wordpress.org/plugins/kayce-custom-archive-sections/#reviews)
 *  [التنصيب](https://ar.wordpress.org/plugins/kayce-custom-archive-sections/#installation)
 * [التطوير](https://ar.wordpress.org/plugins/kayce-custom-archive-sections/#developers)

 [الدعم](https://wordpress.org/support/plugin/kayce-custom-archive-sections/)

## الوصف

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

**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

## لقطات الشاشة

[⌊A section displayed above the post list on the blog index. Sections are ordinary
block editor posts, so they inherit your theme's own styling.⌉⌊A section displayed
above the post list on the blog index. Sections are ordinary block editor posts,
so they inherit your theme's own styling.⌉[

A section displayed above the post list on the blog index. Sections are ordinary
block editor posts, so they inherit your theme’s own styling.

[⌊Every section at a glance — where each one appears, whether it sits before or 
after the posts, and who can see it. Drag the handle to reorder them.⌉⌊Every section
at a glance — where each one appears, whether it sits before or after the posts,
and who can see it. Drag the handle to reorder them.⌉[

Every section at a glance — where each one appears, whether it sits before or after
the posts, and who can see it. Drag the handle to reorder them.

[⌊Editing a section. The Archive Section Settings panel sits beside your content,
so you pick the target pages without leaving the editor.⌉⌊Editing a section. The
Archive Section Settings panel sits beside your content, so you pick the target 
pages without leaving the editor.⌉[

Editing a section. The Archive Section Settings panel sits beside your content, 
so you pick the target pages without leaving the editor.

[⌊The full set of display controls: position, visibility by login state, a date 
range to show within, device targeting, and user roles.⌉⌊The full set of display
controls: position, visibility by login state, a date range to show within, device
targeting, and user roles.⌉[

The full set of display controls: position, visibility by login state, a date range
to show within, device targeting, and user roles.

## التنصيب

**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.

## الأسئلة المتكررّة

### 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**.

## المراجعات

لا توجد مراجعات لهذه الإضافة.

## المساهمون والمطوّرون

“Kayce Custom Archive Sections” هو برنامج مفتوح المصدر. وقد ساهم هؤلاء الأشخاص بالأسفل
في هذه الإضافة.

المساهمون

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

[ترجمة ”Kayce Custom Archive Sections“ إلى لغتك.](https://translate.wordpress.org/projects/wp-plugins/kayce-custom-archive-sections)

### مُهتم بالتطوير؟

[تصفّح الشفرة](https://plugins.trac.wordpress.org/browser/kayce-custom-archive-sections/)،
تحقق من [مستودع SVN](https://plugins.svn.wordpress.org/kayce-custom-archive-sections/)،
أو الاشتراك في [سجل التطوير](https://plugins.trac.wordpress.org/log/kayce-custom-archive-sections/)
بواسطة [RSS](https://plugins.trac.wordpress.org/log/kayce-custom-archive-sections/?limit=100&mode=stop_on_copy&format=rss).

## سجل التغييرات

#### 2.1.0

**New**

 * **Custom taxonomy archives** — a new location that targets every term archive
   of any public custom taxonomy. This covers WooCommerce product categories and
   tags, and any taxonomy registered by a theme or plugin. Previously only the built-
   in Category and Tag archives could be targeted.
 * **Archive Section block** — embed a section from the block inserter instead of
   typing a shortcode. Works in Full Site Editing templates, where a shortcode cannot
   go. Sections are rendered on page load, so an embedded section always shows its
   current content.

**Notes**

 * The block renders through the same code path as `[kcas_section]`, so both honour
   the active toggle, login-state visibility, scheduling, device targeting and user
   roles identically.
 * Tested against WordPress 7.1.

#### 2.0.0

**New locations**

 * Added **Front page** location — targets the static front page independently from
   the blog index.
 * Added **All pages** location — displays on every WordPress page.
 * Added **Specific pages** location — searchable page picker; section only displays
   on selected pages.
 * Added **CPT archives** location — targets the archive listing of a specific custom
   post type.
 * Added **CPT singles** location — targets individual posts of a specific custom
   post type.

**Display controls**

 * **Display scheduling** — optional From / To date pickers. Sections outside their
   date range are hidden automatically. Dates respect the WordPress site timezone.
 * **Device visibility** — Desktop / Tablet / Mobile toggle checkboxes. Implemented
   in CSS `@media` queries — works with all caching setups and CDNs.
 * **User role targeting** — restrict a section to specific WordPress user roles.
   Leave all unchecked for no restriction.

**Shortcode**

 * `[kcas_section id="X"]` — embed any section anywhere in WordPress content. All
   display controls (scheduling, roles, devices) are respected.

**Admin UI**

 * Location grid reorganised into four labelled groups: General, Archives, Singular,
   and Custom Post Types.
 * Searchable **page picker** for Specific pages; **post type dropdown** for CPT
   locations.
 * **Drag-drop reordering** — drag the ☰ handle in the list table to reorder sections
   instantly via AJAX.
 * Default list table sort is now `menu_order ASC` so drag-drop order is immediately
   visible.
 * Duplicate action copies all new meta (pages, CPT, scheduling, devices, roles)
   to the cloned post.

#### 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 **2.1.0**
 *  Last updated **قبل يوم واحد**
 *  Active installations **10+**
 *  WordPress version ** 6.0 أو أعلى **
 *  Tested up to **7.1.3**
 *  PHP version ** 7.4 أو أعلى **
 *  Language
 * [English (US)](https://wordpress.org/plugins/kayce-custom-archive-sections/)
 * Tags
 * [archive](https://ar.wordpress.org/plugins/tags/archive/)[blog](https://ar.wordpress.org/plugins/tags/blog/)
   [category](https://ar.wordpress.org/plugins/tags/category/)[content sections](https://ar.wordpress.org/plugins/tags/content-sections/)
   [gutenberg](https://ar.wordpress.org/plugins/tags/gutenberg/)
 *  [عرض متقدم](https://ar.wordpress.org/plugins/kayce-custom-archive-sections/advanced/)

## التقييم

لم يتم تقديم أي مراجعات بعد.

[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/)

## المساهمون

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

## الدعم

لديك شيء لتقوله؟ بحاجة الى مساعدة؟

 [عرض منتدى الدعم](https://wordpress.org/support/plugin/kayce-custom-archive-sections/)