| 开发者 | wpkayce |
|---|---|
| 更新时间 | 2026年10月13日 22:47 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-2.0+ |
| 版权网址: | 版权信息 |
[kcas_section id="X"] — the same thing as a shortcode, for classic editor and page builder contentabsint(); nonces verified with sanitize_key()kcas_query_args — filter the WP_Query args before sections are fetchedkcas_section_html — filter the HTML of an individual sectionkcas_sections_html — filter the complete output wrapper HTMLkcas_before_sections — action fires before the sections wrapper is outputkcas_after_sections — action fires after the sections wrapper is output<section class="kcas-archive-section" id="kcas-section-{ID}"> and <div class="kcas-archive-sections kcas-archive-sections--{before|after}"> for easy CSS targetingYes — 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.
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.
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.
Yes. Each section has a Visibility setting: Everyone, Logged-in users only, or Logged-out visitors only.
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.
Set the Order value in the Page Attributes panel (lower numbers appear first). Sections with the same order value are sorted alphabetically by title.
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.
No. The plugin uses WordPress's standard wp_posts, wp_postmeta, and wp_options tables only.
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.
The included uninstall.php permanently deletes all Archive Section posts and their meta data when the plugin is removed from Plugins → Installed Plugins → Delete.
[kcas_section], so both honour the active toggle, login-state visibility, scheduling, device targeting and user roles identically.@media queries — works with all caching setups and CDNs.[kcas_section id="X"] — embed any section anywhere in WordPress content. All display controls (scheduling, roles, devices) are respected.menu_order ASC so drag-drop order is immediately visible.core/post-content in addition to core/query.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.wp_reset_postdata() call after the section rendering loop.switch_theme.before_content) position — injects the section between the site header and the page content area, outside the posts grid.article siblings, moves section before the grid with no page reload).is_single()), not just archive pages.core/post-title, core/post-excerpt, core/post-featured-image, etc.) now correctly resolve against the viewed post rather than the section post itself.core/archive-title, core/term-description) are unaffected.single_post location now includes the viewed post ID in the cache key, so each post gets its own cached copy.inherit: true.single_post was missing from the locations list used during cache bust and uninstall.php cleanup.kayce-custom-archive-sections text domain.languages/kayce-custom-archive-sections.pot template for translators.archives, attributes, items_list, items_list_navigation, filter_items_list, and more.frontend.js) enqueued only on relevant pages; sections expose kcas-archive-sections--before_content class for custom CSS targeting.kcas_section) for creating reusable archive sections.kcas_query_args, kcas_section_html, kcas_sections_html, kcas_before_sections, kcas_after_sections.uninstall.php for clean removal.