Skip to:

Topic URLs not as expected, gives 404 :(

  • B


    Hi all,

    Having a slight URL issue. Forums settings / slugs are default, permalink settings are using


    Forums URL is:

    Forums topic URL one level down is:
    … where ‘website-community’ is the category, and ‘announcements’ is the first forum under that.

    Here’s where it breaks. If I hover over a topic, the URL displays as:
    … and if I click, I get a 404.

    If I edit the URL manually, it will work as expected, I just have to take out the category and forum name from the url, such as:

    Why are the category and forum titles appearing in the URL, and what’s the best way to fix?

    Thanks in advance!

Viewing 1 replies (of 1 total)

  • B


    After a little digging, discovered my Custom Post Type Permalinks plugin wasn’t playing nicely with bbPress.

    Problem and solution (albeit temporary) documented here:

    Ultimately, edited the CPTP plugin file directly (ugh) line 290-something

    $parentsDirs = "";
    if( !$leavename ){
    	$postId = $post->ID;
    	if ( !in_array($post_type, array('topic', 'forum', 'reply') ) ) {
    		while ($parent = get_post($postId)->post_parent) {
    			$parentsDirs = get_post($parent)->post_name."/".$parentsDirs;
    			$postId = $parent;
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar