Custom taxonomy template shows 404 Error

My custom taxonomy is “topic” – I needed a page to display all the topics at /topic but it gives a 404.

So I created a normal page in the WordPress admin with the slug /topic. Then I select the template for the page manually:

    function add_custom_templates( $original_template ) {

   global wp;
   if( isset( $wp ) ) {
        if( $wp->request == 'topic' ) {
            return trailingslashit( get_template_directory() ) . 'page-topic.php';
    }} add_action( 'template_include', 'add_custom_templates' );

Excuse the formatting – this editor is nasty!