sandywp / plugins / custom-post-type-permalinks

Custom Post Type Permalinks

4.8 out of 5 stars. 4.8 71 reviews

Edit the permalink of custom post type.

Launch a sandbox with this plugin → No signup.
Ready in seconds.

v3.5.5 200,000+ installs WP 6.7+ PHP 8.0+

your-sandbox.sandywp.com/wp-admin
Custom Post Type Permalinks running inside a SandyWP sandbox

What you get inside

1 screen
  • screenshot-1.png

About this plugin

Custom Post Type Permalinks allow you edit the permalink structure of custom post type.

Change custom taxonomy archive’s permalink to “example.org/post_type/taxonomy_name/term_slug”. Can disable this fix.

And support wp_get_archives( 'post_type=foo' ) and post type date archive (ex. example.com/post_type_slug/date/2010/01/01 ).

This Plugin published on GitHub.

Donation: Please send My Wishlist or Paypal

Translators

Also checkout

Setting on Code

Example:

register_post_type( 'foo',
    array(
        'public' => true,
        'has_archive' => true,
        'rewrite' => array(
            "with_front" => true
        ),
        'cptp_permalink_structure' => '%post_id%'
    )
);

Exclude specific post type

add_filter(  'cptp_is_rewrite_supported_by_foo',  '__return_false' );

// or

add_filter(  'cptp_is_rewrite_supported', function ( $support , $post_type ) {
    if ( 'foo' === $post_type ) {
        return false;
    }
    return $support;
}, 10, 2);

4.8

71 reviews

  • 5 ★ 65
  • 4 ★ 1
  • 3 ★ 1
  • 2 ★ 2
  • 1 ★ 2

Ratings come from WordPress.org. SandyWP does not collect its own reviews.

sandywp / also on the shelf

Try another plugin

  • Custom Permalinks

    4.1 · 100K+ installs

    A powerful WordPress plugin for full URL control. Set custom permalinks, auto-redirects, and use dynamic tags for ideal site…

  • zipaddr-jp

    5.0 · 50K+ installs

    zipaddr-jp is a collaborative tool that automatically inputs addresses from postal codes.

  • Simple Map

    4.7 · 10K+ installs

    Easy way to embed google map(s).

Spin up a real WordPress site in seconds.

Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.