Support » Plugin: Content Blocks (Custom Post Widget) » Make slug editable

  • daniel2k


    I notice that, with the current version of wordpress (5.2.3, with Gutenberg editor) and v3.1 of Content Blocks, it is not possible to manually set the slug of a content block. It appears to be generated off the title on the first save and then is not changable through any means (the full post editor, or quick edit)

    I appreciate this might be a feature to protect users from themselves (and you wouldn’t want future edits to the title to modify the slug), but the ability to manually set an exact slug (which might not look anything like the title) is incredibly useful – especially when it will be an “id code” of sorts for the shortcode.

    Right now I guess the only workaround is to type the slug you want into the title field when you first create a “content block”, then go back and change the title to what you’d like to see on the page.

    There are plenty of valid reasons to want to change a slug after creating a content block though (e.g. swapping one block for another across the site).

Viewing 1 replies (of 1 total)
  • Plugin Author Johan van der Wijk


    Unfortunately, the Gutenberg editor is far from ideal for editing content blocks and indeed does not provide easy access to the page slug settings.

    You could try disabling the Gutenberg editor for content blocks by adding this snippet to your theme’s functions.php file:

    function cb_disable_gutenberg_pages( $can_edit, $post_type ) {
      if ( 'content_block' === $post_type ) {
        return false;
      return $can_edit;
    add_filter( 'gutenberg_can_edit_post_type', 'cb_disable_gutenberg_pages', 10, 2 );
Viewing 1 replies (of 1 total)
  • The topic ‘Make slug editable’ is closed to new replies.