最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Repositioning 'Reply' Link in Comments

programmeradmin1浏览0评论

I'm calling my comments the ol' fashion way:

<?php wp_list_comments('avatar_size=60'); ?>

I would like to be able to position the 'Reply" link where I choose. Right now, it defaults to the bottom of the comment. Sure, I can move it via CSS - but what if I want to place it after the dater or username?

I'm calling my comments the ol' fashion way:

<?php wp_list_comments('avatar_size=60'); ?>

I would like to be able to position the 'Reply" link where I choose. Right now, it defaults to the bottom of the comment. Sure, I can move it via CSS - but what if I want to place it after the dater or username?

Share Improve this question asked Jan 18, 2013 at 21:06 AndrettiMilasAndrettiMilas 1,0516 gold badges26 silver badges55 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

Use a custom callback to render the comment content. Inside of the callback function call comment_reply_link() wherever you need it:

comment_reply_link(
    array_merge(
        $args,
        array (
            'add_below' => 'comment-body',
            'depth'     => $reply_depth,
            // + 1 to offer always a reply link for a consistent UI
            'max_depth' => $args['max_depth'] + 1,
            'before'    => '<p class="reply-line">',
            'after'     => '</p>'
        )
    )
);
发布评论

评论列表(0)

  1. 暂无评论