Skip to content

ตัวอย่างโค้ดเพื่อเปลี่ยนสถิติยอดวิว

แนะนำให้ใช้วิธี Import Stat

แต่หากต้องการเขียนโปรแกรมเพิ่ม สามารถใช้ตัวอย่างโค้ดตามนี้ได้

<?php
add_filter('sstp_views', 'sstp_change_views',10, 2 );
function sstp_change_views($num, $postID) {
if ($postID == 123) {
return $num + 500;
}
return $num;
}
view raw functions.php hosted with ❤ by GitHub