Also fixed category and tag links on single posts
authorLaury GvR <laury@gaslightmedia.com>
Wed, 18 Apr 2018 16:49:55 +0000 (12:49 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 18 Apr 2018 16:49:55 +0000 (12:49 -0400)
See previous commit; the slugs were used for links at the footer of
posts, which would break with Uncategorized categories.

header.php
single.php
style.css

index 74ed70f..4e6c3c3 100644 (file)
@@ -4,7 +4,7 @@
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title><?php wp_title(); ?></title>
-    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/app.css?v=1.1.8">
+    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/app.css?v=1.1.9">
     <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700' rel='stylesheet' type='text/css'>
     <link href='https://fonts.googleapis.com/css?family=Roboto+Slab:400,700' rel='stylesheet' type='text/css'>
     <?php wp_head(); ?>
index f6e2a59..924d3a9 100644 (file)
@@ -32,7 +32,7 @@
                                                     foreach($post_categories as $c){
                                                         $cat = get_category( $c );
                                                         $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
-                                                        echo '<a rel="category" title="View all posts in '. $cat->name . ' " href="'. $cat->slug .'">'. $cat->name .'</a>, ';
+                                                        echo '<a rel="category" title="View all posts in '. $cat->name . ' " href="'. get_category_link( $cat->term_id ) .'">'. $cat->name .'</a>, ';
                                                     }
                                                 }
                                                 $post_tags = wp_get_post_tags( get_the_ID() );
@@ -42,7 +42,7 @@
                                                     foreach($post_tags as $t){
                                                         $tag = get_tag( $t );
                                                         $tags[] = array( 'name' => $tag->name, 'slug' => $tag->slug );
-                                                        echo '<a rel="category" title="View all posts in '. $tag->name . ' " href="'. $tag->slug .'">'. $tag->name .'</a>, ';
+                                                        echo '<a rel="category" title="View all posts in '. $tag->name . ' " href="'. get_tag_link( $tag->term_id ) .'">'. $tag->name .'</a>, ';
                                                     }
                                                 }
                                                 echo ' on ';
index 4800b75..03561f6 100644 (file)
--- a/style.css
+++ b/style.css
@@ -3,5 +3,5 @@ Theme Name: WesternUPCVB
 Author: Gaslight Media
 Author URI: http://www.gaslightmedia.com
 Description: A theme for WesternUPCVB
-Version: 1.1.8
+Version: 1.1.9
 */