Enable category ancestors routing

Recently, K2 don’t fetch menu item for items in a category that is not a direct parent of it.

For example: You have your article in category B which is a descendant of the root category A. You created a K2 Categories menu item which uses A as the category. If you viewed your Article by clicking a link from the website you wouldn’t retrieve a Menu Item. Because it doesn’t allow for category ancestors routing. That means in this case, even though your Article is in a category which is a descendant of A, you still wouldn’t get a Menu Item for that, you must have created a specific menu item that uses B.

The fix
The fix is to add support for category ancestors routing. In technical words I have modified two core files of K2 in order to achieve this kind of routing behaviour, so you should be careful about it if you use this fix.

We have attached two files below:

Download Attachments

Rate for post
Lt Digital Team (Content &Amp; Marketing)
Latest posts by LT Digital Team (Content & Marketing) (see all)

Summer Sale Grab 50% Off for everything on today, don't miss it. Coupon code: SUMMER2024 Redeem Now
Last call: Summer Sale! Grab 50% Off for everything on today, don't miss it. Coupon code: SUMMER2024 Redeem Now