WP Manifestindependent plugin directory
manifest / seo / custom-post-type-permalink-manager

Custom Post Type Permalink Manager

Customize permalink structure for post types and taxonomies with separate base paths and dynamic placeholders (%category%, %year%, etc.)

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/yanivcoweb/custom-post-type-permalink-manager/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin that allows you to customize permalink structures for custom post types with a customizable base path structure.

Features

  • ✅ Set a custom base path (e.g., "newsroom") for all custom post types
  • ✅ Configure URL slugs for each custom post type individually
  • ✅ Map archive URLs to WordPress pages instead of archive templates
  • ✅ Automatically fix Yoast SEO breadcrumbs to include the base path
  • ✅ Simple admin interface for managing all settings
  • ✅ Automatic rewrite rule flushing after settings changes

Installation

  1. Upload the plugin files to the /wp-content/plugins/custom-post-type-permalink-manager directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Go to Settings → CPT Permalinks to configure your post types
  4. Go to Settings → Permalinks and click "Save Changes" to flush rewrite rules

Usage

Basic Configuration

  1. Navigate to Settings → CPT Permalinks
  2. Enter your Base Path (e.g., "newsroom")
  3. Enable the custom post types you want to modify
  4. Configure the URL Slug for each post type (e.g., "events", "press-releases")
  5. Set the Archive Label for breadcrumbs
  6. Enter the Page Slug that should be loaded for archive URLs (e.g., "newsroom")
  7. Click "Save Changes"

Understanding the Fields

  • Base Path: The base URL path for all custom post types (e.g., "newsroom" creates URLs like /newsroom/events/post-name/)
  • URL Slug: The slug used in the URL path for individual posts (e.g., "events", "in-the-media")
  • Archive Label: The label used in breadcrumbs for the archive link
  • Page Slug: The WordPress page slug that will be loaded when someone visits the archive URL (instead of archive templates)

Example

If you configure:

  • Base Path: newsroom
  • Post Type: events
  • URL Slug: events
  • Page Slug: newsroom

Then:

  • Single post URL: http://yoursite.com/newsroom/events/post-name/
  • Archive URL: http://yoursite.com/newsroom/events/ (loads the "newsroom" page)

Requirements

  • WordPress 5.0 or higher
  • PHP 7.0 or higher
  • Yoast SEO (optional, for breadcrumb support)

Frequently Asked Questions

How do I configure the plugin?

Go to Settings → CPT Permalinks in your WordPress admin. Enable the post types you want to modify and configure their URL slugs and page slugs.

Do I need to flush rewrite rules?

Yes, after saving settings, go to Settings → Permalinks and click "Save Changes" to ensure the new URLs work correctly. The plugin will also automatically flush rewrite rules when you save settings.

Does this work with Yoast SEO?

Yes, the plugin automatically fixes Yoast SEO breadcrumbs to include your base path in the correct order.

Can I use pages instead of archive templates?

Yes! The plugin allows you to map archive URLs to WordPress pages. Simply enter the page slug in the "Page Slug" field for each post type.

Changelog

1.0.0

  • Initial release
  • Custom base path configuration
  • Individual post type URL slug configuration
  • Page-based archive support
  • Yoast SEO breadcrumb integration
  • Automatic rewrite rule management

Support

For issues, questions, or contributions, please visit the GitHub repository.

License

This plugin is licensed under the GPL v2 or later.

License URI: https://www.gnu.org/licenses/gpl-2.0.html

Author

Yaniv Sasson

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.