Title: mrpuffy's Replies | WordPress.org

---

# mrpuffy

  [  ](https://wordpress.org/support/users/mrpuffy/)

 *   [Profile](https://wordpress.org/support/users/mrpuffy/)
 *   [Topics Started](https://wordpress.org/support/users/mrpuffy/topics/)
 *   [Replies Created](https://wordpress.org/support/users/mrpuffy/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/mrpuffy/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/mrpuffy/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/mrpuffy/engagements/)
 *   [Favorites](https://wordpress.org/support/users/mrpuffy/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Get the parent slug in the child products](https://wordpress.org/support/topic/get-the-parent-slug-in-the-child-products/)
 *  [mrpuffy](https://wordpress.org/support/users/mrpuffy/)
 * (@mrpuffy)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/get-the-parent-slug-in-the-child-products/#post-18157950)
 * To achieve the desired URL structure (e.g., `/product/parent-product-slug/child-
   product-slug/`), you need to ensure your platform supports hierarchical URLs.
   For WordPress, if you’re using custom post types, ensure the `hierarchical` parameter
   is set to `true` in the `register_post_type` function. This allows parent-child
   relationships. Assign the child product a parent product in the page editor, 
   and WordPress will automatically generate the nested URL. For other platforms
   like Laravel, adjust route definitions to include parent-child slugs, such as`/
   product/{parent}/{child}`. Ensure the logic in your backend resolves the child
   based on the parent to avoid conflicts. On eCommerce platforms like Shopify or
   WooCommerce, you may need plugins or custom permalink structures to achieve hierarchical
   URLs. Always test your routes to confirm proper navigation and SEO compliance.

Viewing 1 replies (of 1 total)