How to create and register custom helpers

I watched this article and went through the links but I think in the newest versions of Ghost folders are changed and etc. P.S. looking for the way to output views of each post using Google analytics

1 Like

There’s never been an official way to add custom helpers, you can make direct edits to the codebase as described in that stackoverflow post, but by virtue of our constantly evolving codebase, it’s tricky to maintain.

For adding dynamic data like this to a page we’d always recommend using client-side extensions in the theme rather than server-side. Server side templates are cached on the server, and HTML generated from those templates is also intended to be cached.

Adding data via ajax on the client side means it remains dynamic.

Here is one Post that might help: