Write some Software WordPress function modification
$10-30 USD
Concluído
Publicado há quase 8 anos
$10-30 USD
Pago na entrega
I need some one to modify a WordPress function that count and gets the post views.
The function is the following:
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";
}
return $count.' Views';
}
function setPostViews($postID) {
$count_key = 'post_views_count';
$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);
}
}
// Remove issues with prefetching adding extra views
remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
So i need this $count++; to count different for the new posts and different for the old posts.
For example if post are 2 hours news then $count = $count++ + 1; else if post are 12 hours old then $count++;
I want to increase the views of the new posts and for the old post after a time limit to start count normally.
To avoid the big amount of post views in the new posts i need the $count++; to stop in i limit of views.
For example if post are 2 hours news then $count = $count++ + 1; LIMIT=500000-Views and after the 500000 Views $count++; else if post are 12 hours old then $count++;
Please be informed that i need a WordPress expert and specialist!
What experience do you have that is relevant to this project?
I have a lot experience with wordpress and PHP
Proposal:
I already have the working function, please contact me to get it
$20 USD em 0 dia
5,0
(37 avaliações)
5,4
5,4
5 freelancers estão ofertando em média $65 USD for esse trabalho
What experience do you have that is relevant to this project?
yes i have 5 years of exp..
Proposal:
Greetings sir, i am an expert freelancer for this job and your 100% satisfaction is assured if you allow me to serve.
Here is the reason. Why you should pick me?
a) I am a very expert and have the same kind of experience of 5 years.
b) I work very hard (18+ hours a day and 7 days a week) and also