Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    If dashes are for sure considered fine for slugs, then I’d be willing to remove it from the switching, but if they’re advised against being in the post type slug, then it’s for the best that we leave it as this. It is an intentional thing at the moment.

    I imagine you could have the URLs be just fine and as intended using the rewrite slug field, which doesn’t get the same conversion behavior.

    Yeah, I noticed this too. Can you elaborate more on your comment “If dashes are for sure considered fine for slugs, then I’d be willing to remove it from the switching, but if they’re advised against being in the post type slug, then it’s for the best that we leave it as this.”

    I tried to see where it is advised and did not find it. I know dashes are advised from an SEO perspective.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    From the following codex page
    https://codex.wordpress.org/Function_Reference/register_post_type

    Also, if the post type contains dashes you will not be able to add columns to the custom post type’s admin page (using the ‘manage_<Custom Post Type Name>_posts_columns’ action).

    May not be the biggest blocker for some, but at the same time we try to make smart choices for the users.

    I also stand by the point I made previously about using the rewrite slug to alter how they appear in the rewrite rules/urls while still using the underscore for the slug itself.

    Thread Starter Navneil Naicker

    (@navzme)

    Thanks Michael Beckwith, I got my answer. Cheers!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    My biggest question, after some contemplation, is if these are post types that had already existed before the update to version 1.3.0 and I’m now breaking because of the swapping.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cannot use dashes as Post Type Slug’ is closed to new replies.