• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Xenforo "Log and count visits" with Custom XF Template

Adam K M

Active member

I've currently got a page "Friend Codes" which from the admin panel is set to "Log and count" page views - however, the page itself needed to use php callbacks and the like, so using the PHP callback tab I had it take on a XenForo template of my own.

However, since it is using a Xenforo Template of my own, the place where you'd normally see things like the "page views" and "social media" buttons are no longer present - I was wondering how I would go about checking/counting the page views for the page with a custom template.


XenForo developer
Staff member
Have a look at the pagenode_container template. The $page value is passed to you so you can use the same output in the template (provided you pass $page to it).