Crocoblock / suggestions

The suggestions for CrocoBlock project
195 stars 78 forks source link

Enhanced Permalink Rewrite and Breadcrumb Control for Custom Post/Content Types #6717

Open lwst opened 1 year ago

lwst commented 1 year ago

Hi there,

I'd like to request a feature that allows for better control over the permalink rewrite and breadcrumbs for SEO purposes. This would be particularly useful when working with multiple custom post/content types (CPTs/CCTs) that have parent-child relationships.

To illustrate the issue, let's consider the following example: We intend to create two custom post types - "Courses" and "Lessons". While registering the CPTs is straightforward, we are encountering difficulty in customizing the URL structure for the lessons. Our desired URL format is: http://my-online-course.com/[course-name]/[lesson-name]/

While it is possible to create a parent-child relationship between the CPTs, this relationship is not reflected in the URL and breadcrumbs. As a result, we end up with two separate URL paths:

  1. http://my-online-course.com/courses/[course-name]/
  2. http://my-online-course.com/lessons/[lesson-name]/ This configuration is not ideal for SEO, as the lessons are actually children of courses.

Using hierarchical CPTs is one solution, but it is not scalable for cases with multiple levels of parent-child relationships (e.g., continent > country > region > city > neighborhood > activities).

I found an article online that demonstrates how to establish a relationship between different CPTs and rewrite the URL using code: https://1fix.io/blog/2016/02/05/parent-from-another-cpt/

It would be incredibly beneficial to have this functionality built-in, allowing for easier management of permalink rewrites and breadcrumbs in custom post/content types with parent-child relationships. Please let me know if you need any further clarification or information.

Thank you for your attention to this request.

lwst commented 1 year ago

Hi. Any update on this? @Floydtm

cookiemachine commented 3 months ago

+1