ArafatKn.Com

Go Ahead with the Power of Technology

WP Post Views Count without plugin

Today i am going to share how to add post views counting system on wordpress without any plugin. First, copy this code of php function to yours THEME functions.php file. Basically /wp-content/themes/YOUR-THEME/functions.php <? 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”; } return $count; } […]

How To Access private member variables of a class without using its public member functions ? Answerred Using C++

Today i am going to tell you how to access private member variables of a class without using its public function. Method 1:  Using friend function. Consider the following example:- #include<iostream> using namespace std; class A { int a; friend void seta(A &ob,int x); friend int geta(A &ob); }; void seta(A &ob,int x) { ob.a=x; […]

Personal Blog of ARAFAT ISLAM © 2016