Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using SimpleModal to allow users to click on a post excerpt on my homepage and popup a box showing the full post. However it doesn't count for an actual view of the post when this happens. Is there a way to make wordpress recognize it as a view? I'm using wp-postviews to track view counts.

share|improve this question
    
Some links to the plugins would be useful. You know, some of us don’t know the source code of all plugins ever written. Strange, I know, but it’s true. ;) –  toscho Apr 6 '12 at 4:19
    
good point sorry about that –  Pollux Khafra Apr 6 '12 at 13:36

1 Answer 1

up vote 2 down vote accepted

Apparently the plugin does the logging inside the wp_head hook:

add_action('wp_head', 'process_postviews');

so make sure you call wp_head() in your pop-up box, or if you can't do that (pop-up is not a html document), then just call the function directly, like:

if(function_exists('process_postviews'))
  process_postviews();

// the_content();  ?
share|improve this answer
    
That totally works! Thanks alot! –  Pollux Khafra Apr 6 '12 at 14:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.