diff --git a/ca-design-system-gutenberg-blocks.php b/ca-design-system-gutenberg-blocks.php
index e1f7abb..5a84842 100644
--- a/ca-design-system-gutenberg-blocks.php
+++ b/ca-design-system-gutenberg-blocks.php
@@ -6,7 +6,7 @@
* Description: Gutenberg blocks to be used in WordPress that are compatible with the California's design system
* Author: Office of Digital Innovation
* Author URI: https://digital.ca.gov
- * Version: 1.0.5
+ * Version: 1.0.6
* License: MIT
* License URI: https://opensource.org/licenses/MIT
* Text Domain: ca-design-system
diff --git a/includes/class-ca-design-system-gutenberg-blocks-templates.php b/includes/class-ca-design-system-gutenberg-blocks-templates.php
index 0f35d16..6868bbe 100644
--- a/includes/class-ca-design-system-gutenberg-blocks-templates.php
+++ b/includes/class-ca-design-system-gutenberg-blocks-templates.php
@@ -126,10 +126,10 @@ private function _load_default_page_template_styles()
public function ca_design_system_gutenberg_blocks_default_page_template_styles()
{
- wp_register_style('ca-design-system-gutenberg-blocks-page', plugins_url('styles/page.css', __DIR__), false, '1.0.3a');
+ wp_register_style('ca-design-system-gutenberg-blocks-page', plugins_url('styles/page.css', __DIR__), false, '1.0.6');
wp_enqueue_style('ca-design-system-gutenberg-blocks-page');
- wp_register_style('ca-design-system-gutenberg-blocks-announcement', plugins_url('styles/announcement.css', __DIR__), false, '1.0.3');
+ wp_register_style('ca-design-system-gutenberg-blocks-announcement', plugins_url('styles/announcement.css', __DIR__), false, '1.0.6');
wp_enqueue_style('ca-design-system-gutenberg-blocks-announcement'); // Default post
// wp_register_style('ca-design-system-gutenberg-blocks-event', plugins_url('styles/event.css', __DIR__), false, '1.0.3');
diff --git a/includes/class-ca-design-system-gutenberg-blocks.php b/includes/class-ca-design-system-gutenberg-blocks.php
index 6642d77..ce17abb 100644
--- a/includes/class-ca-design-system-gutenberg-blocks.php
+++ b/includes/class-ca-design-system-gutenberg-blocks.php
@@ -51,7 +51,6 @@ private function __construct()
$this->_load_block_category();
add_action('ca_design_system_breadcrumb', array($this, 'get_breadcrumb_callback'));
-
}
/**
@@ -197,6 +196,8 @@ public function get_breadcrumb_callback()
{
/* Quick breadcrumb function, @TODO Register in plugin to call as a shortcode or function */
+ global $post;
+
$separator = "/";
$linkOff = true;
$items = wp_get_nav_menu_items('header-menu');
@@ -208,6 +209,7 @@ public function get_breadcrumb_callback()
);
+
foreach ($items as $item) {
if ($item->current_item_ancestor) {
if ($linkOff == true) {
@@ -216,20 +218,23 @@ public function get_breadcrumb_callback()
$crumbs[] = "url}\" title=\"{$item->title}\">{$item->title}";
}
} else if ($item->current) {
- $crumbs[] = "{$item->title}>";
+ $crumbs[] = "{$item->title}";
}
}
- if (is_category()) {
+ if (is_category()) {
global $wp_query;
$category = get_category(get_query_var('cat'), false);
- $crumbs[] = "{$category->name}>";
+ $crumbs[] = "{$category->name}";
+ }
+ if (count($items) == 0 && !is_category()) {
+ $category = get_the_category($post->ID);
+ $crumbs[] = "" . $category->name . "";
}
-
+
echo implode($separator, $crumbs);
}
-
}
diff --git a/includes/templates/template-single.php b/includes/templates/template-single.php
index 2e71633..fede326 100644
--- a/includes/templates/template-single.php
+++ b/includes/templates/template-single.php
@@ -16,7 +16,7 @@
}
?>
-