Crea sito

Category Archives: Tutorial

[TUTORIAL] Make Widget like in this site

Many people ask me how to make have the Newstatpress information in the side Widget like the one you can see in this site.

It is very simple: you have to use HTML.

You can use all the HTML potential (insert tables…) 🙂

For example, here the text I put inside the widget in this site:

<ul> 
<li>Visitors online: %visitorsonline% </li>
<li>Today visits: %visits%</li>
<li>Total page visits: %thistotalvisits%</li>
<li>Total site visitors: %totalvisits%</li>
<li>Your ip: %ip%</li>
<li>Your browser: %browser%</li>
<li>Your os: %os%</li>
</ul>

[TUTORIAL] Let not WP pages to be counted in statistic

Thanks to the help of Maurice Cramer that experiment a bit with the plugin, you can let NewStatPress to count even visits to pages in your site that are not managed by WordPress.

For making this to happen you have to:

  • Place at least your pages into the root directory level of WordPress (where wp.config.php lies)
  • Your pages can have their directory structure as you like
  • For each page you must insert this code:
<? 
require('../wp-blog-header.php'); 
>?

Use as many ../ or reaching that files from yuor directory where the page is placed.

Thats all 🙂

The content is blocked until cookie law is accepted and page is reloaded.