Editing single.php from WP install or frontity?

I need to add a code snippet to the WP single.php file. From my experience with WP this would always obviously be done in the WP install single.php, however with Frontity, is there a way to add a php snippet to the blog.js file or would I need to add it to the single.php file in the WP install? This might not make sense, so I can expound if needed.

The reason for needing to add code to the single.php file is to add the ability to view post views counter. I am using this article: https://blog.hubspot.com/website/wordpress-post-views. But if anyone has a better way to accomplish this that would also be helpful.

Hi @meaghan1,

If what you want to do is displaying popular posts with Frontity you first need to add that info to the REST API. Here you have a related answer for getting this:

Hope this helps.