How to track clicks

Unless you have a “religious” objection to share data with google then using GA is just the simplest and best way to go. Storing stats in your DB is a good start if you want to bring your server down when there is slightly high traffic, and in any case you can get all the … Read more

Add estimated value for a post according to the number of words

Here’s an idea for a starting point, by looking how the word counting is done in the /wp-admin/js/post.js file: /** * Testing word price calculations */ add_action( ‘after_wp_tiny_mce’, function() { ?><script> ( function( $ ) { $( function() { // Init var $content = $( ‘#content’ ), $count = $( ‘#wp-word-count’ ).find( ‘.word-count’ ), total_price … Read more

WordPress stats API key

This is why: http://plugins.trac.wordpress.org/browser/stats/tags/1.7.2/stats.php#L685 The deactivation hook deletes your database information. I’m guessing you’re manually deactivating the plugin, updating, and then re-activating? If so, that runs the deactivation hook. Fortunately, that’s not from the latest version. This is: http://plugins.trac.wordpress.org/browser/stats/tags/1.7.3/stats.php#L686 So that shouldn’t happen anymore. By the way, you shouldn’t think that this means you were … Read more

How to display number of page views on a post?

Try this Works on single site // post views function setAndViewPostViews($postID) { $count_key = ‘views’; $count = get_post_meta($postID, $count_key, true); if($count==”){ $count = 0; delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, ‘0’); }else{ $count++; update_post_meta($postID, $count_key, $count); } return $count; /* so you can show it */ } You need to add the following function to your theme’s … Read more

How to display BBpress statistics?

It seems BBPress got a function called bbp_get_statistics() read source. You can throw an array of $args = array(); in it. You also have a filter to modify the output: apply_filters( ‘bbp_get_statistics’, $statistics, $args ); Disclaimer: I’m no BBPress expert – I haven’t even installed it somewhere, just found this via google.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)