Support » Fixing WordPress » Help Modifying Addcat Function

  • iamPariah

    (@iampariah)


    To work around the bug in WP 1.5x where WP gets confused about which parent category owns a post if the system contains more than a single subcat with the same name, I’m trying to modify the addcat routine in categories.php. I’m having a little trouble with the correct syntax, though. Could someone help me out?

    Basically, when WP builds $category_nicename, I want it to also append a hyphen and the parent category cat_ID to the name. For example: Creating a new sub-category called “child” inside the parent cat “Mom” with the cat_ID of 3 should create a “child” nicename of “child-3”. Then, creating the “child” inside “Dad” (cat_ID 4) would beget “child-4” as a nicename.

    Would one of your PHP wizards mind giving me the line of code I need to add to categories.php to accomplish this?

    Thanks!

  • The topic ‘Help Modifying Addcat Function’ is closed to new replies.