<?php

add_filter('template_include', 'page_template');
function page_template($template)
{
    $theme = get_stylesheet_directory();
    $page = null;
    switch ($_GET['page']) {
        case 'login':
            $page = $theme . '/login.php';
            break;
        case 'register':
            $page = $theme . '/register.php';
            break;
        case 'forget':
            $page = $theme . '/forget.php';
            break;
        case 'my':
            $page = $theme . '/my.php';
            break;
        case 'view':
            $page = $theme . '/view.php';
            break;
        case 'list':
            $page = $theme . '/list.php';
            break;
        default:
            $page = $template;
            break;
    }
    return $page;
}

?>