这是我用来列出当前用户评级帖子的代码(我使用wp-postratings 我的网站上用于评级帖子的插件):
<?php
global $wpdb, $current_user;
$userranking = $wpdb->get_results( " SELECT * FROM wp_ratings WHERE rating_userid=$current_user->ID ");
if($userranking) {
foreach ( $userranking as $userranking ) {
echo "<li><a class=\'rankedposttitle\' href=\'" .get_permalink($userranking->rating_postid). "\'>" .get_the_title($userranking->rating_postid). "</a></li>";
}
}
?>
如何列出当前用户尚未评分的帖子?