【发布时间】:2017-08-05 15:22:30
【问题描述】:
我正在开发一些 ajax 脚本并使用 wordpress,我的问题是:有没有办法以某种方式从 wordpress 函数中提取评论 URL?我在循环中使用的函数如下所示:
<?php comments_popup_link('Discuss »', '1 Comment »', '% Comments »'); ?> <?php edit_post_link('Edit', '| ', ''); ?>
HTML 输出如下所示:
<a href="http://www.somepage.com/staging/2010/06/15/sadfasfregw/#respond" title="Comment on sadfasfregw"><span class="dsq-postid-17546">View Comments</span></a>|
<a class="post-edit-link" href="http://www.somepage.com/staging/wp-admin/post.php?action=edit&post=17546" title="Edit post">Edit</a>
但是,我只对 src (http://www.somepage.com/staging/2010/06/15/sadfasfregw/#respond) 感兴趣。有没有办法从那里得到它,然后在以后的参考中使用它? wordpress中是否存在某种功能或类似的东西?
【问题讨论】:
标签: wordpress