$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 = ;
for ($i = ; $i < count($posts); $i++) {
$votes_likes_sum += get_post_meta($posts[$i]->ID, '_votes_likes', true);
}
echo $votes_likes_sum;
$post = $posts[];
echo $post->ID;
print get_post_meta(, '_votes_likes', true);

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

wordpress 获取指定作者的所有 post meta的更多相关文章

  1. wordpress 获取指定作者或者文章的所有评论数量

    wordpress 获取指定作者或者文章的所有评论数量 <?php $args = array( 'post_author' => '' // fill in post author ID ...

  2. WordPress 获取指定分类ID的分类信息

    get_term:直接从数据库中获取分类信息get_the_category:使用post_id作为参数,先根据post_id查询对应的文章然后再返回对应的分类信息,如果没有文章信息则返回Null 之 ...

  3. c# 获取指定目录下的所有文件并显示在网页上

    参考文献: FileInfo 的使用  https://msdn.microsoft.com/zh-cn/library/system.io.fileinfo_methods(v=vs.110).as ...

  4. 【百度地图API】如何调整结果面板的样式?如何获取指定页码的结果?

    原文:[百度地图API]如何调整结果面板的样式?如何获取指定页码的结果? 摘要: 1.你是否想自定义查询后,结果面板的显示样式? 2.数据接口每次只返回10条结果,如何取到单独每一页的结果? ---- ...

  5. PHP获取指定地区的天气

    在开发网站的时候用到天气查询,由于是基于Wordpress的 所以有很多限制,先建一个[weather.php]的文件,然后看代码: <?php //获取天气 $url = 'http://m. ...

  6. Unity获取指定资源目录下的所有文件

    使用前需要引入System.IO;这个命名空间 public void GetFiles() { //路径 //string path = string.Format("{0}", ...

  7. [Swift]字符串根据索引获取指定字符,依据ASCII实现字符和整数的相互转换

    ASCII(American Standard Code for Information Interchange,美国信息交换标准代码)是基于拉丁字母的一套电脑编码系统,主要用于显示现代英语和其他西欧 ...

  8. Code:获取指定汉字的首字母

    ylbtech-Code:获取指定汉字的首字母 1.获取指定汉字的首字母返回顶部 1. /// <summary> /// 获取指定汉字的首字母 /// </summary> ...

  9. Delphi阿里云邮件推送【支持单一发信、邮件批量发送和获取指定条件下的发送数据】

    作者QQ:(648437169) 点击下载➨Delphi阿里云邮件推送               阿里云api文档 [Delphi阿里云邮件推送]支持SingleSendMail(单一发信接口). ...

随机推荐

  1. linux防火墙和xshell的链接

    centos7用的firewalld 1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: ...

  2. 数据科学:pd.DataFrame.drop()

    一.功能 删除集合中的整行或整列: 二.格式 df.drop(labels=None, axis=0, index=None, columns=None, level=None, inplace=Fa ...

  3. 在visual studio中找到属性管理器

    方法一: 我们可以在新建的项目中通过视图-->其他窗口-->属性管理器来找到. 这样就能找到属性管理器了. 感谢:https://blog.csdn.net/qq_37939434/art ...

  4. Netbackup常用命令--bprestore

    bprestore bprestore – 从 NetBackup 服务器还原文件 大纲 bprestore [-A | -B | -rb] [-K] [-l | -H | -y] [-r] [-T] ...

  5. 论文笔记系列-Auto-DeepLab:Hierarchical Neural Architecture Search for Semantic Image Segmentation

    Pytorch实现代码:https://github.com/MenghaoGuo/AutoDeeplab 创新点 cell-level and network-level search 以往的NAS ...

  6. c#每天生成漂亮桌面背景、英文名言、翻译

    阅读目录 一.1. 下载bing.com壁纸查询API 二.2. 解析返回的壁纸JSON信息 三.3. 下载完成的壁纸图片 阅读目录 .NET生成漂亮桌面背景 .NET生成漂亮桌面背景 总结 回到目录 ...

  7. 缺jar包异常:java.lang.NoClassDefFoundError: org/springframework/core/convert/support/PropertyTypeDescriptor

    严重: StandardWrapper.Throwable java.lang.NoClassDefFoundError: org/springframework/core/convert/suppo ...

  8. 项目Beta冲刺(团队)——05.27(5/7)

    项目Beta冲刺(团队)--05.27(5/7) 格式描述 课程名称:软件工程1916|W(福州大学) 作业要求:项目Beta冲刺(团队) 团队名称:为了交项目干杯 作业目标:记录Beta敏捷冲刺第5 ...

  9. 学习:SLT_string容器

    前言:这个学了感觉没多大用,自己只需要了解就好,忘记了可以参考以下网站的示例 参考网站:https://github.com/AnkerLeng/Cpp-0-1-Resource/blob/maste ...

  10. Trie Service

    Description Build tries from a list of <word, freq> pairs. Save top 10 for each node. Example ...