安装了WordPress,其中也添加了自己写的HTML静态页面,
现在想调用这个WordPress中的评分插件,怎么让我的自己写的页面, 伪装成一篇WordPress发表的新文章?
让我写的页面也具有评分功能。
现在已经 知道, 使用 [rate] 可以调用评分插件,但高级自定义还是不太会。.
下面是说明文档:
= How do I manually get the most rated posts using PHP? =
$posts = PostRatings()->getTopRated($arguments);
Possible arguments, and their defaults:
<code>'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 </code>
Return value is an array of post objects containing the usual post properties + 3 extra properties:
<code>$post->votes // number of votes $post->rating // average rating $post->bayesian_rating // weighted rating </code>
Example usage:
<code>global $post; $results = PostRatings()->getTopRated(); foreach($results as $post){ setup_postdata($post); ?> // here is the usual loop <?php the_title(); ?> - <?php printf(_n('%d vote', '%d votes', $post->votes), $post->votes); ?> <?php } // restore original post wp_reset_postdata(); </code></code>
回复内容:
安装了WordPress,其中也添加了自己写的HTML静态页面,
现在想调用这个WordPress中的评分插件,怎么让我的自己写的页面, 伪装成一篇WordPress发表的新文章?
让我写的页面也具有评分功能。
现在已经 知道, 使用 [rate] 可以调用评分插件,但高级自定义还是不太会。.
下面是说明文档:
= How do I manually get the most rated posts using PHP? =
$posts = PostRatings()->getTopRated($arguments);
Possible arguments, and their defaults:
<code>'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 </code>
Return value is an array of post objects containing the usual post properties + 3 extra properties:
<code>$post->votes // number of votes $post->rating // average rating $post->bayesian_rating // weighted rating </code>
Example usage:
<code>global $post; $results = PostRatings()->getTopRated(); foreach($results as $post){ setup_postdata($post); ?> // here is the usual loop <?php the_title(); ?> - <?php printf(_n('%d vote', '%d votes', $post->votes), $post->votes); ?> <?php } // restore original post wp_reset_postdata(); </code></code>

wordpress标签错误的解决办法:1、找到并打开wordpress的“wp-includes”目录下的“class-wp.php”文件;2、修改内容为“$pathinfo = isset( $_SERVER['PATH_INFO'] )?mb_convert_encoding($_SERVER['PATH_INFO'],'utf-8','GBK') : '';”即可。

wordpress后台乱码的解决办法:1、在wordpress的“wp-admin”文件夹下找到“admin.header.php”文件;2、将“charset”属性值设置为“UTF-8”格式即可恢复正常。

你下载的WordPress主题提供的keywords和description这两个meta标签一般都做得很差,或者根本就不提供,这样不利于SEO。本文将指导你如何给主页、分类、页面以及文章页添加单独的Description 和 Keywords。

wordpress乱码的解决办法:1、修改“wp-config.php”文件里的“define(’DB_CHARSET’, ‘utf8′);”为“define(’DB_CHARSET’, ”);”;2、把新数据库的编码设置成“latin1_swedish_ci”;3、以uft8的格式导入备份的数据库文件即可。

wordpress进不去的解决办法:1、把地址栏“wp-login.php”后面的参数删掉,然后重新输入密码登录;2、登录FTP,下载“pluggable.php”文件,然后找到“ADMIN_COOKIE_PATH”并将它替换为“SITECOOKIEPATH”即可。

wordpress不是saas。SaaS是一种软件销售模式,它主要针对云端应用软件,而WordPress是一款CMS系统,它主要针对网站构建和管理。虽然WordPress可以作为SaaS提供服务,但它本质上不是一种SaaS应用。

wordpress是2003年发布的;Matt于2003年5月27日宣布推出第一版WordPress,受到了社区的欢迎,它基于b2 Cafelog并有显著改进;WordPress的第一个版本包括全新的管理界面、模板、XHTML 1.1兼容模板、内容编辑器。

本次PHP中文网整合了相关的视频教程,中文手册,以及相关的精选文章安利给大家,统统免费!!!通过我们分享的视频,可随时随地免费观看教程视频,也不需要迅雷或者百度网盘下载了。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

螳螂BT
Mantis是一个易于部署的基于Web的缺陷跟踪工具,用于帮助产品缺陷跟踪。它需要PHP、MySQL和一个Web服务器。请查看我们的演示和托管服务。

SecLists
SecLists是最终安全测试人员的伙伴。它是一个包含各种类型列表的集合,这些列表在安全评估过程中经常使用,都在一个地方。SecLists通过方便地提供安全测试人员可能需要的所有列表,帮助提高安全测试的效率和生产力。列表类型包括用户名、密码、URL、模糊测试有效载荷、敏感数据模式、Web shell等等。测试人员只需将此存储库拉到新的测试机上,他就可以访问到所需的每种类型的列表。

PhpStorm Mac 版本
最新(2018.2.1 )专业的PHP集成开发工具

Dreamweaver CS6
视觉化网页开发工具

禅工作室 13.0.1
功能强大的PHP集成开发环境