2016-11-20 54 views
-1

用户是否有任何方式只能在wordpress中看到他们的评论?用户只能在wordpress中看到他们的评论

我READE这个话题: Commenter should see only his comments in wordpress

,但它是没有用的。

问候

代码的注释模板:

<ol class="comment-list"> 
    <?php wp_list_comments(array('style' => 'ol', 'short_ping' => true,)); ?> 
</ol><!-- .comment-list --> 
+0

为什么不呢?在这个链接的解决方案是你正在寻找 – elicohenator

+0

我不知道的PHP:| –

+0

检查我的答案在这里 – elicohenator

回答

0

您试图修改默认的WordPress设置 - 在这种情况下,PHP是比necessery多。您所链接的链接中的解决方案是最简单和最优化的 - 如果重要的是聘请开发人员为您做这件事。

这是一些示例代码:

<ol class="comment-list"> 
    <?php $user_id = get_current_user_id(); 
     $user_comments = get_comments('user_id' => $user_id); 
     wp_list_comments( 
      array('style' => 'ol', 'short_ping' => true,), 
     $user_comments); ?> 
</ol> 
+0

为什么不在你的问题?请风格,并提出问题 – elicohenator

+0

该网站未加载。我很抱歉,但我无法为您提供比我更多的帮助。我的朋友,雇用一名开发人员。 – elicohenator

+0

谢谢。祝你好运 –

相关问题