Skip to:

Change the permalink of topics from name to ID (bbPress Plugin)

Viewing 6 replies - 1 through 6 (of 6 total)

  • John James Jacoby


    Unfortunately not easily. WordPress handles the rewrite rules for bbPress’s content types. It’s possible to overload them, but you’ll need to do so on your own.

    Thanks John

    so I need to use “Rewrite API/add rewrite rule” in wordpress, isn’t?!

    John James Jacoby


    Correct, but you’ll need to be creative, since you’ll want to unset or override existing rules.


    I´m running a wordpress/buddypess/bbpress combination and I also need to change the permalink structure, in a bit different way then eleram – I´m looking for a more logic structure in all forums:

    -> replace slug “forum” by name of forum

    -> replace “topic” by name of topic

    I can customize the code, but I´m not sure where to look on.

    @John: “WordPress handles the rewrite rules for bbPress’s content types” -> where do I have to look for (bbpress´ custom post types) to adjust the permalink logic?

    Of course I will share my customization as soon a sfinished.


    John James Jacoby



    The BuddyPress permalink structure is hardcoded to look for specific criteria in specific positions. It doesn’t really scale well, and we’re going to change it in future versions to use proper rewrite rules, but until then it would be a huge nightmare to change; even then, your changes would end up broken when we make improvements to the API.

    The rewrite rules themselves get created in register_post_type() in /wp-includes/post.php. Lots of complex logic in there, and I doubt there are many better examples on how to write your own rewrite rules completely from scratch than inside that function.

    Thanks John!

    You´re right, that´s pretty deep in the core. Though from a SEO perspective it´s also a nightmare to start a project with URLs you have to rewrite later ;) – Let me know if I can contribute in this special case, the project itsels made huge steps forward – thanks for your work.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar