启用WP-postratings

问题描述 投票:1回答:2

我已经创建了自己的wordpress主题并安装了WP-Postratings插件,但它不起作用。我只添加

<?php if(function_exists('the_ratings')) { the_ratings(); } ?>

它显示评级图像,但我不能评价任何东西。

我应该在函数中添加一些东西,也许原因是ajax,我应该添加一些函数吗?

wordpress rating-system
2个回答
1
投票

我在我的主题上使用相同的插件

评级按钮

if(function_exists('the_ratings')) { the_ratings(); }

评级平均值

 if(function_exists('the_ratings')) { echo ''.expand_ratings_template('<span class="rating-images">%RATINGS_IMAGES%</span>', get_the_ID()); }

如果它不起作用你可能有任何javascript冲突,尝试禁用所有插件并再次尝试。你必须确保admin-ajax.php没有被服务器或其他任何东西阻止。


0
投票

你应该在函数中添加一些东西。那段代码就足够了。

它通常发生是因为插件与另一个插件崩溃。逐个禁用其他插件,直到您可以评分。然后使用类似的插件更改引发问题的插件。

© www.soinside.com 2019 - 2024. All rights reserved.