0
Hi, I am Beginners My question is how to design/code the most viewed post section in home page (plugin)
Home page designing.
2 ответов
+ 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
0
So I need to know php mysql for it