See some statistics about the comments

For most commented posts you can use a custom loop in the sidebar for example: <h3>Most Commented Posts</h3> <?php $most_commented = new WP_Query(‘orderby=comment_count&posts_per_page=5’); if($most_commented->have_posts()) : ?> <ul class=”most-commented-posts”> <?php while($most_commented->have_posts()) : $most_commented->the_post(); ?> <li><a href=”https://wordpress.stackexchange.com/questions/38006/<?php the_permalink() ?>” rel=”bookmark” title=”<?php the_title_attribute(); ?>”><?php the_title(); ?> (<?php comments_number(‘0′,’1′,’%’); ?>)</a></li> <?php endwhile; ?> </ul><!– most-commented-posts –> <?php endif; wp_reset_query(); … Read more

Need to know custom code to display random and most viewed posts in wordpress posts and pages

A standard WordPress install doesn’t keep track of visits to pages/posts. So without a plugin there’s no way to know which posts/pages are visited most often. As to finding random posts that’s as simple as: $args = array( ‘post_type’ => array( ‘post’, ‘page’, ‘my-custom-post-type’ ) ‘orderby’ => ‘rand’, ); $query = new WP_Query ($args);

WordPress stats: OWA plugin overhead in the future

I hadn’t used this specific solution, but any self-hosted analytics in general should be considered potentially huge resource hog: every async action in WordPress is effectively another WP core load, so if tracking code makes even one additional async request to back-end it effectively doubles the load; stat logging by nature cannot be cached; stat … Read more

Get total views of all posts by author

Gathering page view statistics is inherently write operation, which is inherently heavy on resources. There are no appropriate mechanisms in WP for high volume writes at low resource consumption. Your best bet is using external analytics system/service and retrieving page view data from it.

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