Directory / plugin

PCP Linkflow Engine

v1.0.2 ยท by pcprajapat

Full URL control for every post type and taxonomy. Customize slugs, remove bases, and define permalink structures - all from a clean admin interface.

About this plugin

PCP Linkflow Engine gives you complete control over every URL on your WordPress site. Whether you need to remove the /product/ prefix from WooCommerce products, add a custom base to a taxonomy, or restructure your page URLs โ€” this plugin handles it all from a clean, modern admin interface.

No code required. Changes take effect immediately with automatic rewrite rule flushing.

๐Ÿ”‘ Key Features:

Post Type URL Control
– โœ๏ธ Set a custom slug for any public post type (e.g. /shop/ instead of /product/)
– ๐Ÿ—‘๏ธ Remove the slug entirely โ€” serve products, posts, or CPTs at root level (e.g. /jacket/ instead of /product/jacket/)
– ๐Ÿ“„ Full support for hierarchical post types like Pages (e.g. /pages/about/team/)
– ๐Ÿ›’ WooCommerce compatible โ€” works correctly with the shop page, product archives, is_product(), and all WooCommerce template hooks

Taxonomy URL Control
– โœ๏ธ Set a custom base for any public taxonomy (e.g. /topics/ instead of /category/)
– ๐Ÿ—‘๏ธ Remove the base entirely โ€” serve term archives at root level (e.g. /clothing/ instead of /product-category/clothing/)
– ๐ŸŒณ Full support for hierarchical taxonomies โ€” sub-terms work correctly (e.g. /clothing/accessories/)
– โœ… Correct is_tax(), admin bar links, and taxonomy templates when base is removed

Developer Friendly
– ๐Ÿ”Œ Filter hooks: pcplfe_post_type_slug, pcplfe_taxonomy_slug, pcplfe_permalink_structure, pcplfe_remove_post_type_slug, pcplfe_remove_taxonomy_slug
– ๐ŸŒ REST API โ€” read and write settings via /wp-json/pcplfe/v1/
– ๐Ÿ“ฆ Import / Export โ€” back up and restore all settings as JSON
– ๐Ÿงฉ PSR-4 autoloaded OOP architecture under the PCPLFE\ namespace

Modern Admin UI
– ๐ŸŽจ Clean, Tailwind-inspired design with toggle switches
– ๐Ÿ“‘ Tabbed settings for Post Types and Taxonomies
– ๐Ÿ”„ POST Redirect GET pattern โ€” no duplicate saves on refresh
– ๐Ÿ’พ Active tab preserved across saves and page refreshes

REST API

PCP Linkflow Engine exposes a REST API under the pcplfe/v1 namespace. All endpoints require the manage_options capability.

Authentication

Use WordPress Application Passwords (WordPress 5.6+). Generate one at Users Your Profile Application Passwords, then pass it with every request:

-u "your-username:xxxx xxxx xxxx xxxx xxxx xxxx"

Endpoints

GET /wp-json/pcplfe/v1/settings

Returns all saved post type and taxonomy settings.

curl -u "admin:xxxx xxxx xxxx xxxx xxxx xxxx" \
  https://yoursite.com/wp-json/pcplfe/v1/settings

Example response:

{
  "post_type_settings": {
    "post": { "enabled": true, "custom_slug": "articles", "remove_slug": false }
  },
  "taxonomy_settings": {
    "category": { "enabled": true, "custom_base": "topics", "remove_base": false }
  }
}

POST /wp-json/pcplfe/v1/settings

Save post type and taxonomy settings from a JSON body.

curl -u "admin:xxxx xxxx xxxx xxxx xxxx xxxx" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "post_type_settings": {
      "post": { "enabled": true, "custom_slug": "articles", "remove_slug": false }
    },
    "taxonomy_settings": {
      "category": { "enabled": true, "custom_base": "topics", "remove_base": false }
    }
  }' \
  https://yoursite.com/wp-json/pcplfe/v1/settings

GET /wp-json/pcplfe/v1/permalink?post_id=X

Returns the custom permalink record for a given post ID.

curl -u "admin:xxxx xxxx xxxx xxxx xxxx xxxx" \
  "https://yoursite.com/wp-json/pcplfe/v1/permalink?post_id=123"

Example response:

{
  "post_id": 123,
  "post_type": "post",
  "default_permalink": "https://yoursite.com/articles/hello-world/",
  "custom_permalink": "https://yoursite.com/my-custom-slug/",
  "record": { "permalink": "my-custom-slug" }
}

POST /wp-json/pcplfe/v1/permalink

Save a custom permalink for a specific post. Send an empty permalink value to remove the override.

curl -u "admin:xxxx xxxx xxxx xxxx xxxx xxxx" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "post_id": 123,
    "post_type": "post",
    "permalink": "my-custom-slug"
  }' \
  https://yoursite.com/wp-json/pcplfe/v1/permalink

To remove a custom permalink override:

curl -u "admin:xxxx xxxx xxxx xxxx xxxx xxxx" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "post_id": 123,
    "post_type": "post",
    "permalink": ""
  }' \
  https://yoursite.com/wp-json/pcplfe/v1/permalink

Plugin tags