I am trying to do the following
I need to get the category of the current page at the plugin level so before it goes to
so i have a plugin to do this and based upon category it switches themes .. however i am stuggling to get the category at the plugin level when i am using custom permalinks which do not have a query string (ie seo friendly urls)
So if i go to the default permalinks , I can get the category within the plugin using
However with the custom permalinks that returns null and I have not been able to think of another way of doing this ,
Please can anyone help ?
Thanks a lot