0

Hi, I am Beginners My question is how to design/code the most viewed post section in home page (plugin)

Home page designing.

20th Oct 2019, 6:23 AM
Sourabh Mane
Sourabh Mane - avatar
2 Answers
+ 2
you'll need a backend. and persistent data storage, any db will do. so whenever a page is requested you'll have to add that into the counter (each page should he their own) then update the counter data to your database. in php with mysql it should looks like mysqli_query($dbconnection, "UPDADE `post` SET `view_counter`=`view_counter`+1 WHERE `post_id` = $postid"); // // start processing page here
20th Oct 2019, 7:49 AM
Taste
Taste - avatar
0
So I need to know php mysql for it
20th Oct 2019, 8:05 AM
Sourabh Mane
Sourabh Mane - avatar