How to load a different theme for categories?

Ok, after some consideration and tinkering I could get it to work.
The reason it wasn’t working was because the needed procedures for loading a template kick in long before the the parser gets to functions.php of the theme. So to overcome this I had to bring the code into the plugins’ section.
By creating a plugin the needed filters are called in time therefore the theme gets changed correctly.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)