Smart WP redirects

So I was trying to figure out how to redirect from a category page in WordPress to another page. It’s not too hard. To do it manually I just used the following: function my_page_template_redirect() { if ( is_category( 'zero-emission-transport' ) ) { $url =...