diff --git a/themes/modern2/pages/new/newPost.htm b/themes/modern2/pages/new/newPost.htm index 750f454ff..b5039015e 100644 --- a/themes/modern2/pages/new/newPost.htm +++ b/themes/modern2/pages/new/newPost.htm @@ -30,8 +30,9 @@ function onStart(){ $catId = $this['featuredPosts'][0]->categories[0]->id; //dd($this['featuredPosts'][0]->categories[0]->slug); - if($this->menuItems && $postId && $currentPost && $currentPost->category_groups){ + if($this->menuItems && $postId && $currentPost && $currentPost->category_groups->count() > 0){ + $currentGroup = $currentPost->category_groups[0]->name; foreach ($this->menuItems as $menu){