Example #1
0
})->where(array('search' => 'alpha_numeric', 'currentPage' => 'integer'));
Router::get(WP::path() . 'category/', function () {
    $c = array();
    $c['Category'] = 'category/';
    WP::printBreadCrumbs($c);
    //WP::template('category-list','<a class="wp-category-list" href="{{$path}}category/{{$slug}}">{{$name}} - {{$count}}</a>');
    $categories = WP::topCategories(1000);
    View::html("<div class='clearfix'>{$categories}</div>");
    //WP::clearTemplate('category-list');
});
Router::get(WP::path() . 'category/{category}', function ($category) {
    $c = array();
    $c['Category'] = 'category/';
    $c[$category] = 'category/' . $category;
    WP::printBreadCrumbs($c);
    WP::category($category);
})->where('category', 'alpha_numeric');
Router::get(WP::path() . 'author/', function () {
    $c = array();
    $c['Author'] = 'author/';
    WP::printBreadCrumbs($c);
    WP::template('author-list', '<a class="wp-author-list" href="{{$path}}author/{{$user_nicename}}">{{$display_name}}</a>');
    $authors = WP::topAuthors(10);
    View::html("<div class='clearfix'>{$authors}</div>");
    WP::clearTemplate('author-list');
});
Router::get(WP::path() . 'tag/{tag}/page/{currentPage}', function ($tag, $currentPage) {
    $c = array();
    $c['Tag'] = 'tag/';
    $c[$tag] = 'tag/' . $tag;
    WP::printBreadCrumbs($c);