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

    (@tw2113)

    The BenchPresser

    Give this tutorial a try https://betterstudio.com/blog/include-category-in-wordpress-permalinks/

    It’s not something that we have any specific settings for with CPTUI, so hopefully tutorials like the one above will help achieve that structure.

    Thread Starter eaglesfan1227

    (@eaglesfan1227)

    Thank you for the link. Unfortunately, it’s just a basic tutorial on how to add categories to slugs. I have the “/%category%/%postname%/” in the Custom Structure Field in the settings but that does not carry over to your plugin. The URL’s in the CPT UI do not recognize the “/%category%” and only use the “/%postname%/” part; this leaves out the categories “State” (Parent) and “County” (Child). Not suite sure if that’s how you intended your plugin to work or if this is in fact, a one-off issue on my end. Anyway, I would think categories in slugs is quite important. Thanks for your help!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Permalink rules shouldn’t be getting treated as exclusive in some way and those rewrites should apply to post types created by CPTUI just fine, unless some sort of setting being provided by the user is not matching up.

    Did you put a custom value in the rewrite slug field for the post types in question? or were those left blank to allow it to fall back to defaults values that WP core would determine?

    Thread Starter eaglesfan1227

    (@eaglesfan1227)

    They were left blank. If I have a category of [State], here is what happens:

    URL.com/[POST TYPE SLUG in your settings]/%postname%

    The category of [State] – let’s use NY as an example] – is left out. It should be:

    URL.com/[POST TYPE SLUG in your settings]/NY/%postname%

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not completely sure what’s going on with that, especially if they were left blank. We don’t have a lot of code in CPTUI regarding setting up complete custom permalinks like inserting categories into them, etc. Majority of the rewrite fields are just for the post type slug or taxonomy slug themselves, and not other parts.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Slugswith Parent Category’ is closed to new replies.