bbclone w/ WordPress 2
-
Hello folks. I’m not new to bbclone by any means, but this is my first try at putting it in a WordPress site.
I’ve read many forum and blog posts that suggest adding code to each template file, such as index.php, archive.php, page.php, single.php, etc.
I’ve also read suggestions about adding a single piece of code to wp-blog-header.php.
Both of the above suggestions work, but it seems that both incorrectly track visits. For example, if I add code to the wp-blog-header.php file, it seems to add 2-4 hits for every single visit to an archive page. Now, that’s not accurate is it?
I’m trying to understand why I can’t add bbclone code to my header.php file and be done. There, it doesn’t track at all. However, this seems to be the one template file that is used on every page, and only once.
I’d like a SINGLE place to add this code.
The code I’m using is this:
<?php if (is_home() == true) { $pagetitle = "Home"; } else { $pagetitle = wp_title('', false); } define("_BBC_PAGE_NAME", $pagetitle); define("_BBCLONE_DIR", "bbclone/"); define("COUNTER", _BBCLONE_DIR."mark_page.php"); if (is_readable(COUNTER)) { include_once(COUNTER); } else { echo "Counter is broken."; } ?>
Thanks.
- The topic ‘bbclone w/ WordPress 2’ is closed to new replies.