I’m not sure I understand what you’re trying to do…
Ok,
I am willing to identify and track which page of a post a user visited.
Using <!–nextpage–> in a post, you can split the post into pages (like pagination). Under that case, the global variable $page and $numpages contain the current page a user is visiting.
Documentation: http://codex.wordpress.org/Styling_Page-Links
Given a post http://example.com/my_post that has 3 pages, wordpress creates the following links contains one part of the post.
http://example.com/my_post/1
http://example.com/my_post/2
http://example.com/my_post/3
SlimStats tracks the post (/my_post) and I have not seen any reference to the page.
Is there a way to track the page too?
Cheers,
I will run some tests and let you know.
use this in single.php
<div class="entry-content" >
<?php the_content(); ?>
<?php wp_link_pages(); ?>
</div>
use this function in functions.php
function custom_nextpage_links($defaults) {
$args = array(
'before' => '<div class="my-paginated-posts"><p>' . __('Countinue: '),
'after' => '</p></div>',
);
$r = wp_parse_args($args, $defaults);
return $r;
}
add_filter('wp_link_pages_args','custom_nextpage_links');
also use this css for style
/*== Post pagination ==*/
.my-paginated-posts {
font-size:10px; font-weight:normal; font-family:arial; }
.my-paginated-posts p { font-size:1.4em; }
.my-paginated-posts p a {
background:#E8E8E8; color:#000; margin-left:0.2em; margin-right:0.2em;
padding:0.5em 0.7em; text-decoration:none; }
.my-paginated-posts a:hover { color:#fff; background:#0066FF; }
There must be something strange in your configuration. We were not able to replicate the issue on our dev environment: we correctly get /hello-world/2/ under Right Now, when we visit the second page of our test post.
Could you please provide the following info?
– WordPress version
– WP SlimStat version
– PHP version
– Web Server type (apache, IIS, etc)
– Plugins used on your site
– Redirects
Thank you