$args = array( 
    'post_type' => array( 'post','knowledgebase'), 
    'post_status' => 'publish',
    'author'    =>  $author_id,
    'numberposts'=> $author_all_posts
);
post_title
$posts = get_posts($args);
$votes_likes_sum = 0;
for ($i = 0; $i < count($posts); $i++) {
    $votes_likes_sum += get_post_meta($posts[$i]->ID, '_votes_likes', true);
}
echo $votes_likes_sum;
$post = $posts[0];
echo $post->ID;
print get_post_meta(1357, '_votes_likes', true);

 

获取指定作者的所有 Post Meta 信息

相关文章:

  • 2022-12-23
  • 2021-08-11
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
猜你喜欢
  • 2021-11-24
  • 2021-04-24
  • 2021-12-28
  • 2022-12-23
  • 2021-07-03
  • 2022-02-03
  • 2021-07-28
相关资源
相似解决方案