Title: KHALAF Shortcodes CPT, Pages, Template
Author: Ahmed Khalaf
Published: <strong>September 25, 2026</strong>
Last modified: September 25, 2026

---

Search plugins

![](https://ps.w.org/khalaf-shortcodes-cpt-pages-template/assets/icon-256x256.png?
rev=3713095)

# KHALAF Shortcodes CPT, Pages, Template

 By [Ahmed Khalaf](https://profiles.wordpress.org/khalaf22/)

[Download](https://downloads.wordpress.org/plugin/khalaf-shortcodes-cpt-pages-template.1.0.0.zip)

 * [Details](https://wordpress.org/plugins/khalaf-shortcodes-cpt-pages-template/#description)
 * [Reviews](https://wordpress.org/plugins/khalaf-shortcodes-cpt-pages-template/#reviews)
 *  [Installation](https://wordpress.org/plugins/khalaf-shortcodes-cpt-pages-template/#installation)
 * [Development](https://wordpress.org/plugins/khalaf-shortcodes-cpt-pages-template/#developers)

 [Support](https://wordpress.org/support/plugin/khalaf-shortcodes-cpt-pages-template/)

## Description

**KHALAF Shortcodes CPT, Pages and Template** adds a dedicated, one-click copyable
shortcode column (“Shortcode (KHALAF)”) to your WordPress admin tables for every
public post type (Pages, Posts, WooCommerce Products, Custom Post Types, Templates)
and every public taxonomy (Categories, Tags, Product Categories, and custom taxonomies).

Simply click on any shortcode field inside your admin tables to copy it instantly
to your clipboard and reuse that content, template, or archive grid anywhere on 
your website!

#### Key Features

 * **Copy-Ready Admin Columns**: Instant copy-to-clipboard fields directly inside
   admin list tables.
 * **Universal Post & Template Shortcode**: `[khalaf-content id="123"]` works across
   pages, posts, WooCommerce products, CPTs, and templates.
 * **Smart Layout Engine**: Supports `layout="auto"` (default), `full` (complete
   article with featured image and metadata), `product` (complete WooCommerce product
   page), `card` (clean modern card), `shop` (WooCommerce grid), and `blog` (latest
   posts grid).
 * **Taxonomy Term Shortcode**: `[khalaf-term id="12" taxonomy="category"]` outputs
   term posts grids, term cards, images, titles, or archive links.
 * **Built-in Term Image Support**: Adds a lightweight media uploader for category
   and taxonomy term images, fully compatible with themes and shortcodes.
 * **Performance Optimized**: Zero database clutter, assets are loaded on demand
   only when shortcodes or admin tables are rendered.
 * **Elementor & Page Builder Friendly**: Seamlessly renders Elementor templates
   or page builder layouts when active, with smooth fallback to standard content.

#### Post & Content Shortcode

    ```
    [khalaf-content id="123"]
    ```

The `layout` attribute controls the output presentation:
 * `auto` (default) – Page
builder content if present; complete WooCommerce product layout for products; content
for pages and templates; styled article for posts. * `full` – Featured image, post
title, author, date, categories, tags, and full content. * `product` – Complete 
WooCommerce product page (gallery, price, add to cart button, tabs). * `card` – 
Modern styled responsive card. * `content` – Raw content only. * `shop` – WooCommerce
products grid (useful for embedding catalog items). * `blog` – Latest posts grid.

Other supported attributes: `show_title`, `show_image`, `show_meta` (yes/no), `columns`,`
limit`, `orderby`, `order`.

#### Taxonomy Term Shortcode

    ```
    [khalaf-term id="12" taxonomy="category"]
    ```

Term attributes:
 * `show="posts"` (default) – Grid of posts/products associated
with this term. * `show="card"` – Compact term card (image, name, description, button).*`
show="image"` – Term image only (`size`, `link="yes"`). * `show="description"` –
Term description only. * `show="title"` – Term name only. * `show="link"` – Direct
archive link.

#### Built-in Security

 * **Strict Authorization**: Private, draft, and scheduled content is only rendered
   to logged-in users with appropriate editing permissions.
 * **Password Protection**: Password-protected posts are never exposed through shortcodes.
 * **Anti-Recursion Shield**: Automatic recursion detection blocks circular inclusions(
   e.g. Post A calling Post B which calls Post A).
 * **Sanitized & Escaped**: All inputs, IDs, attributes, and output markup are strictly
   sanitized and escaped following WordPress coding standards.

## Installation

 1. Upload the `khalaf-shortcodes-cpt-pages-template` folder to your `/wp-content/plugins/`
    directory.
 2. Activate the plugin via **Plugins  Installed Plugins**.
 3. Open any admin list screen (Pages, Posts, Products, Categories…) and click on the
    shortcode field to copy it.
 4. Paste the shortcode into any page, post, widget, or page builder block.

## FAQ

### Does this plugin require Elementor?

No. The plugin is completely independent and works natively with the WordPress Block
Editor (Gutenberg), classic editor, or any page builder. If Elementor is active,
it also supports Elementor templates.

### Does it work with WooCommerce products and categories?

Yes. Products receive `[khalaf-content]` and product categories receive `[khalaf-
term taxonomy="product_cat"]` automatically.

### What shortcodes are supported?

The official shortcodes are `[khalaf-content]` and `[khalaf-term]`. Additional aliases
such as `[khalaf-post]`, `[khalaf-template]`, and `[khalaf-elementor-template]` 
are also supported.

### Why does a password-protected post output nothing?

Password-protected content is deliberately filtered out to safeguard sensitive data
from unauthorized exposure.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“KHALAF Shortcodes CPT, Pages, Template” is open source software. The following 
people have contributed to this plugin.

Contributors

 *   [ Ahmed Khalaf ](https://profiles.wordpress.org/khalaf22/)

[Translate “KHALAF Shortcodes CPT, Pages, Template” into your language.](https://translate.wordpress.org/projects/wp-plugins/khalaf-shortcodes-cpt-pages-template)

### Interested in development?

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

## Changelog

#### 1.0.0

 * Initial public release on WordPress.org.
 * Universal `[khalaf-content]` shortcode for pages, posts, CPTs, products, and 
   templates.
 * Taxonomy term shortcode `[khalaf-term]` with dynamic posts grid and term cards.
 * One-click copyable admin table columns.
 * Circular inclusion prevention and permission-based visibility.
 * Native term image uploader for custom taxonomies.

## Meta

 *  Version **1.0.0**
 *  Last updated **15 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **7.1.2**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [cpt](https://wordpress.org/plugins/tags/cpt/)[custom post type](https://wordpress.org/plugins/tags/custom-post-type/)
   [post content](https://wordpress.org/plugins/tags/post-content/)[shortcode](https://wordpress.org/plugins/tags/shortcode/)
   [templates](https://wordpress.org/plugins/tags/templates/)
 *  [Advanced View](https://wordpress.org/plugins/khalaf-shortcodes-cpt-pages-template/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/khalaf-shortcodes-cpt-pages-template/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/khalaf-shortcodes-cpt-pages-template/reviews/)

## Contributors

 *   [ Ahmed Khalaf ](https://profiles.wordpress.org/khalaf22/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/khalaf-shortcodes-cpt-pages-template/)