Forums

How do you correctly register a custom taxonomy in a theme? (1 post)

  1. benz001
    Member
    Posted 2 years ago #

    With 2.8 its easy to register custom taxonomies in functions.php and the UI elements auto-generate perfectly in the admin.

    However the rewrite rules (and hence taxonomy templates) don't work for your new taxonomies until you either call $wp_rewrite->flush_rules(); from a plugin registration or happen to visit the permalink settings page in the admin. Registering a new taxonomy doesn't automatically flush the rewrite rules.

    What's best practice in theme development for handling this issue?

Topic Closed

This topic has been closed to new replies.

About this Topic