• Resolved franksmith2486

    (@franksmith2486)


    Hi CPT UI team, I’m going to create my websites(by Elementor) with different product categories, like basketball, football, baseball, etc. The product link should go as http://www.aaa.com/basketball/basketball-001/. How to achieve that?

    I’ve made “products” as a new post type with Taxonomies. However, all the product links go like http://www.aaa.com/product-item/basketball-001, as the Custom Rewrite Slug is set as “product-item”.

    I’ve also created different categories for the “products” post type. On the category page, the product category slugs go as the correct ones like “basketball” “football” and “baseball”, but I don’t know how to match the products with these categories and display them on the links correctly. (The product links all go as http://www.aaa.com/product-item/backetball-001/ as mentioned above.)

    Looking forward to your early reply to solve my problem, really appreciate it! : )

    BR
    Frank Smith

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

    (@tw2113)

    The BenchPresser

    If I’m reading everything correctly, i assume you ideally want a single post type permalink of this:

    https://mydomain.com/taxonomy-term/post/

    This is based on you using a post type slug of products and a taxonomy of product-category

    Correct?

    If yes, then there’s going to be work needing done outside of the capabilities that CPTUI can handle. The portions of the permalink are what tells WordPress query parsing what each component is.

    For example /product-item/basketball-001 is telling WP that basketball-001 is a term from the product-item taxonomy.

    I wonder if https://wordpress.org/plugins/permalink-manager/ could help shape your permalinks to more your need. Otherwise, it’d take a fair amount of custom coding to make things work the way I think you’re needing.

    Best other idea I have would be the “/basketball/” portion being a parent post in the post type, instead of a product category term, and use the permalink plugin above to remove the post type slug base.

    Thread Starter franksmith2486

    (@franksmith2486)

    Yes, exactly. The parent post may be also a good idea. OK, I’m going to try permalink manager plugin right now. Thank you very much! : )

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Welcome.

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

The topic ‘How to custom the slug’ is closed to new replies.