1
0
mirror of https://github.com/ascribe/wp-theme synced 2024-12-22 09:13:38 +01:00

add an All link to category nav

This commit is contained in:
Matthias Kretschmann 2016-03-17 17:25:19 +01:00
parent 679a77c1de
commit b0a664a3b9

View File

@ -42,6 +42,8 @@ require 'controller/init.php';
$args = array( $args = array(
'hide_empty' => 0 'hide_empty' => 0
); );
echo "<li><a href='{$blogUrl}'>All</a></li>";
foreach((get_categories($args)) as $category) { foreach((get_categories($args)) as $category) {
if ($category->cat_name != 'Uncategorized') { if ($category->cat_name != 'Uncategorized') {
echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '><span>' . $category->name.'</span></a></li> '; echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '><span>' . $category->name.'</span></a></li> ';