diff --git a/plugins/bedard/blogtags/components/BlogTagSearch.php b/plugins/bedard/blogtags/components/BlogTagSearch.php index 688b7b57f..a1637f533 100644 --- a/plugins/bedard/blogtags/components/BlogTagSearch.php +++ b/plugins/bedard/blogtags/components/BlogTagSearch.php @@ -4,6 +4,7 @@ use Cms\Classes\Page; use Bedard\BlogTags\Models\Tag; use Cms\Classes\ComponentBase; use Rainlab\Blog\Models\Post; +use App; class BlogTagSearch extends ComponentBase { @@ -197,7 +198,7 @@ class BlogTagSearch extends ComponentBase private function calculatePagination() { // Count the number of posts with this tag - $this->totalPosts = Post::whereHas('tags', function($tag) { + $this->totalPosts = Post::whereHas('tags_'.App::getLocale(), function($tag) { $tag->where('name', $this->property('tag')); }) ->count();