Duplicate posts and custom post types in WordPress
Duplicate adds a "Duplicate" action to the admin list and to the block editor sidebar, creating an exact draft copy of a post — with all taxonomies, meta fields and ACF values intact. Works on any public post type.
Key features
- "Duplicate" row action directly in the posts/pages/CPT list
- Button in the Gutenberg editor sidebar
- Copies taxonomies (categories, tags, custom taxonomies) by ID, not by name
- Copies every meta field including ACF — no manual (un)serialize involved
- The new copy is always created as a draft, never auto-published
- Automatically resolves a unique slug to avoid collisions
- Skips internal meta like _edit_lock or _wp_old_slug
- Duplication is intentionally disabled for WooCommerce products and orders
How it works
The module hooks its own admin action into the row-actions of every public post type the current user may create. On "Duplicate", SMRK Toolkit reads the full post data (`get_post`), its taxonomies (`wp_get_object_terms`) and every meta field (`get_post_meta`), then creates a new post with identical content but `draft` status.
Meta fields are copied key by key via `add_post_meta`, so even complex ACF structures (repeaters, flexible content, relationship fields) stay valid after duplication — there is no bulk string/regex manipulation of serialized data involved.
An alternative to Duplicate Page, Yoast Duplicate Post or Duplicate Post (copy-delete-posts) — no need to install a whole separate plugin for a single feature.