I installed WordPress and added my own HTML static pages. Now I want to call the scoring plug-in WordPress, how can I make my own pages, disguised as a new WordPress article? The page I wrote also has a scoring function. Now we know that we have installed WordPress using..., and added HTML static pages written by ourselves,
Now I want to call the scoring plug-in WordPress. How can I disguise my own pages as a new WordPress article?
The page I wrote also has a scoring function.
Now we know that you can use the [rate] To Call The scoring plug-in, but advanced customization is not very good ..
The instructions are as follows:
= How do I manually get the most rated posts using PHP? =
$posts = PostRatings()->getTopRated($arguments);
Possible arguments, and their defaults:
'post_type` => 'post','number' => 10, // max. number of posts to retrieve'offset' => 0, // offset from where to start'sortby' => 'bayesian_rating', // bayesian_rating, rating or votes'order' => 'DESC', // ASC or DESC'date_limit' => 0, // date limit in days
Return value is an array of post objects ining the usual post properties + 3 extra properties:
$post->votes // number of votes$post->rating // average rating$post->bayesian_rating // weighted rating
Example usage:
global $post;$results = PostRatings()->getTopRated();foreach($results as $post){ setup_postdata($post); ?> // here is the usual loop
-
votes), $post->votes); ?>
Reply content:WordPress is installed, and an HTML static page is added,
Now I want to call the scoring plug-in WordPress. How can I disguise my own pages as a new WordPress article?
The page I wrote also has a scoring function.
Now we know that you can use the [rate] To Call The scoring plug-in, but advanced customization is not very good ..
The instructions are as follows:
= How do I manually get the most rated posts using PHP? =
$posts = PostRatings()->getTopRated($arguments);
Possible arguments, and their defaults:
'post_type` => 'post','number' => 10, // max. number of posts to retrieve'offset' => 0, // offset from where to start'sortby' => 'bayesian_rating', // bayesian_rating, rating or votes'order' => 'DESC', // ASC or DESC'date_limit' => 0, // date limit in days
Return value is an array of post objects ining the usual post properties + 3 extra properties:
$post->votes // number of votes$post->rating // average rating$post->bayesian_rating // weighted rating
Example usage:
global $post;$results = PostRatings()->getTopRated();foreach($results as $post){ setup_postdata($post); ?> // here is the usual loop
-
votes), $post->votes); ?>