Skip to content

Instantly share code, notes, and snippets.

View sergenadiyaman's full-sized avatar

sergenadiyaman

View GitHub Profile
@joshuadavidnelson
joshuadavidnelson / duplicate-child-term-url-structure.php
Last active April 10, 2025 04:21
Using a Parent > Child category structure with duplicate child url slugs; for urls like `category/parent-1/child` and `category/parent-2/child`.
<?php
/**
* Plugin Name: Duplicated Child Term Url Slugs
* Description: Duplicate child term urls slugs in hierarchical taxonomies.
* Version: 0.1.0
* Author: joshuadnelson
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*
* This is setup like a plugin, but can be included in a theme or as a class in a plugin.