Info
- 6 posts
- 4 voices
- Started 9 months ago by Anointed
- Latest reply from John James Jacoby
- This topic is not resolved
Need a custom permalink rule
-
- Posted 9 months ago #
I am importing my vbulletin forum into bbpress and all is working perfectly. I do have one request though.
My old permalink structure is website.com/Community/forum-name/postname.html
I had no problem getting the Community to replace the standard 'forums' in the admin panel.
What I need help with is how to change the single post view url to the above scheme.
Currently bbpress does website.com/Community/topic/topic-name
I want to replace topics with the name of the forum the post is in, and if it's a grandchild forum have it /forum-name/sub-forum-name/post-name.html
any advice?
-
- Posted 9 months ago #
The only thing I can think of is Nicer Permalinks http://bbpress.org/plugins/topic/nicer-permalinks/ its not exactly what you are looking for but its the next best thing
-
- Posted 9 months ago #
@Anthony
thnx for the suggestion. I am more after a simple function that I can apply to the theme and modify to my hearts desire. At the moment I have little experience with rewrites :( sad....
-
- Posted 9 months ago #
Hi there anointed. I assume that you are using bbPress 1.*. Let's see what we got:
In bbPress the topic permalink is builded against site and not forum.
If I have a topic named 'foo' in forum 'bar' and then I create another 'foo' topic in forum 'pub' then the permalink will be automagically named foo-2 by the
bb_slug_incrementfunction.You want:
/forum-name/sub-forum-name/post-name.html
You can't achieve this behaviour with just an .htaccess tweaking. You need also to intercept the
get_topic_linkfilter and change the link. Maybe also you will need to do something in thebb_repermalinkfunction.It can be quite challenging.
-
- Posted 9 months ago #
@zaerl
thnx for info
No I am using the new plugin.
I do realize that I am going to have to work with some functions to intercept and change the permalinks as well as htaccess work.
Mostly I was just checking to see if any other gurus here had tackled this task yet.
-
- Posted 9 months ago #
You can try making topics hierarchical, but that might make things goofy in other places.
You might need to buckle down and write your own custom rules to overload the ones that WordPress generates with the custom post type.
-
You must log in to post.