I have a column in my website’s footer where I show the visitors of today, yesterday and all times which looks like this:

<p> Today's Views:   <span> <!--?php here comes the related php code ?--> </span></p><br><br>

<p>Yesterday's Views:   <span> <!--?php here comes the related php code ?--> </span></p><br><br>

<p>All times Views:   <span> <!--?php here comes the related php code ?--> </span></p><br><br>

For this reason I’ve already installed wp Statistics plugin and I want o use its functions. But when I try to use one of the functions below I get this error:

Fatal error: Call to undefined function wp_statistics_today() in
/home/xxxx/public_html/wp-content/themes/xxx/footer.php on
line 34

<?php echo wp_statistics_today(); ?>
<?php echo wp_statistics_yesterday(); ?>

But when I call I get the corrent result.

How can I fix this?

Please note that I’m talking about my whole website’s view count;
not a specific post or page

Read more here: How to show the number of website visitors in my theme


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: