Thank you @vikaspotluri123 for your response.
I have removed get helper from the code:
{{#foreach posts}}
{{title}}
{{/foreach}}
Still no luck. It is working well on the main index or home page and paginated posts but not on the collections and channels index page. It shows the pagination but not get any title, every page is blank.