wp-knowledgebase icon indicating copy to clipboard operation
wp-knowledgebase copied to clipboard

Customisable Permalink Structure

Open maevelander opened this issue 10 years ago • 14 comments

See https://wordpress.org/support/topic/use-the-breadcrumb-also-in-the-url-structure

I agree with this user... it would be very nice to improve the permalink structure as per his suggestion

maevelander avatar Mar 01 '15 05:03 maevelander

Hey Sorry !!

I didn't understand what the user is requesting ... can you explain it in a bit of detail ??

Base29 avatar Mar 02 '15 07:03 Base29

Currently the structure is: www.domain.com/knowledgebase/article-title

User is suggesting that there be an option to also have category in there like this: www.domain.com/knowledgebase/category-title/article-title

maevelander avatar Mar 02 '15 07:03 maevelander

Still working on this ... it seems that we have to control this using .htaccess ... not very good when it comes to .htaccess but I am doing some tests ...

Base29 avatar Mar 31 '15 07:03 Base29

Ok cool. Lets not do it if it needs htaccess stuff... but hopefully there is another solution.

maevelander avatar Apr 02 '15 02:04 maevelander

I am still doing some search on this … will implement as soon as I figure out a solution for this …

Base29 avatar Apr 02 '15 05:04 Base29

@EnigmaWeb the category included in the article link would be nice. additionally as already posted to the wp.org forum, It would be amazing to customize the category permalink.

knowledgebase_category is not that nice and doesnt match with the custom knowledgebase slug we are able to set.

flowdee avatar Jul 14 '15 20:07 flowdee

Take a look at how WooCommerce is doing this. First they add some settings to the permalinks page. And then they modify how the product post type is registered based on the permalinks settings.

helgatheviking avatar Sep 01 '15 14:09 helgatheviking

Ok, not there yet, but here's my dev branch where I will tackle this.

helgatheviking avatar Sep 04 '15 18:09 helgatheviking

Tags and category slugs were handled in 7187d79e1a31971aa9d80efd3656a2df8755712d

helgatheviking avatar Sep 05 '15 12:09 helgatheviking

and boom: 7cdd48666e1c2c637b97343ff6e56cb5ba54f9b8

Needs slightly better permissions checking since the settings API doesn't get triggered on the permalinks page.

I tried to include an option to prepend the article category like so: documentation/article-category/article-name

But I kept getting 404 errors, so I dropped it from this commit. I was hoping it would be easier since I am mostly just lifting the code from WooCommerce. I have the code that gets it in the options, but then you need 3 extra functions to fix the rewrite rules... in theory anyway. I'm in over my head with regex and rewrite rules and I don't know how much this would be realllly needed.

helgatheviking avatar Sep 06 '15 00:09 helgatheviking

@EnigmaWeb can you give us feedback about this issue? Would be really amazing to get this. knowledgebase_category is definately really bad

flowdee avatar Sep 21 '15 17:09 flowdee

@flowdee We are currently working on a major release which incorporates significant changes and improvements (thanks to @helgatheviking ) We're currently working through testing as there are some backwards compatibility issues that need to be sorted out before releasing on the repo. We all agree this customisable permalink structure would be ideal so rest assured we plan to work on it and get it implemented at some point.

maevelander avatar Sep 22 '15 03:09 maevelander

nice to hear. Let me know if you need some tester

flowdee avatar Sep 22 '15 06:09 flowdee

Hi! Any news on this? It would be a great feature to have!

johnny-bit avatar Jul 14 '16 09:07 johnny-bit