Support » Plugin: Pods - Custom Content Types and Fields » Showing category name in the permalink slug for Custom Post Type

  • Resolved morespinach

    (@morespinach)


    I am not sure if this is the answer to my question:
    https://wordpress.org/support/topic/how-to-remove-slug-from-url/

    I really would not like to register a custom taxonomy. All of that jazz in WordPress creates other issues like having to create a whole new template (archive-xyz) and also in search later.

    Our permalink is the usual:
    %category%/%postname%/

    We have a custom post type called articles (magazine articles).

    We create an article with the name “Sunny in Florida”. It belongs in the category “Travel”. We expect the URL based on our permalink structure to be:

    /travel/sunny-in-florida

    Instead, Pods creates this permalink:

    /article/sunny-in-florida

    What am I missing?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jim True

    (@jimtrue)

    https://docs.pods.io/advanced-topics/url-rewrites-custom-rewrites/

    In addition, you can’t get the /%category%/%postname%/ without including the post-type otherwise WordPress has no idea what post-type you’re dealing with. That type of structure only works with ‘post’ post-types.

    WordPress doesn’t allow you to obliterate the post-type slug in the URL rewrite without custom programming or .htaccess changes or other methods not within the support scope of the Pods Framework. See the link above.

    Thank you for this. IN my example, can I then at least have

    /article/travel/sunny-in-florida

    Where:

    – ‘article’ is the CPT
    – ‘travel’ is a usual category (*not* a custom taxonomy)

    I tried setting “with front” to true, but it doesn’t do anything inside that plugin: custom post type permalinks.

    Plugin Author Jim True

    (@jimtrue)

    Those kinds of configurations (showing the taxonomy category behind the post-type instead of the slug of the post-type) is not Standard behavior. Please see the link I provided which provides places to go to find stuff like that.

    Pods Framework doesn’t provide those kinds of custom things, because it’s outside scope. Custom Post Type Permalinks might do what you need, but you’re going to have to do that research.

    You cannot do the structure you’re trying to do with any of the standard support rewrite arguments from WP Core.

    Plugin Author Jim True

    (@jimtrue)

    Also if you’re having issues with Custom Post Type Permalinks and trying to figure it out, you need to route your questions to their support forum.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.