How to improve post views count display?

Yes you can. You have to check if the post view count is higher than 1000, is so, then round it and return it: function getPostViews($postID) { $count_key = ‘post_views_count’; $count = get_post_meta($postID, $count_key, true); if($count==”) { delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, ‘0’); return “0 View”; } if ($count > 1000) { return round ( $count … Read more

Is there a way to have the view link on manage posts page to open in a new window or tab?

Late answer WP core offers a function for that case, that makes it much easier and future proof: Simply map it on each item. Wrapped up in a plugin Best used as mu-plugin. <?php /* Plugin Name: (#32093) »kaiser« Open “action”-links in post type list screens in new windows/tabs */ function wpse32093_link_target_blank( $actions, $post ) … Read more

Make view count for pop up post

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(); ?

Show content from database

You could use custom post types and custom taxonomies. Using the custom post types to store data, taxonomies to categorize the data and you can utilize WordPress’ default searching functionality. https://codex.wordpress.org/Post_Types https://codex.wordpress.org/Taxonomies https://codex.wordpress.org/Creating_a_Search_Page

How to show post views on single.php page?

Your implementation of the getPostViews function looks fine, and I don’t see an issue having that inside your single.php or breadcrumbs.php. However, I would move both functions into your functions.php (more info here) and rather than calling setPostViews inside single/breadcrumbs.php, I would attach it to a WordPress action. <?php //…inside your functions.php… add_action( ‘init’, ‘fa_setpostviews’ … Read more

Sorting posts according to view counts not working

Your code doesn’t make sense. You use query_posts(), which you should never do, but all that does is clobber the main query. You don’t use the clobbered query though. You then use get_posts() with an undefined (so far as code posted indicates) argument list, so it is not going to return what you expect. I … Read more

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