admin管理员组文章数量:1326277
I am using a theme that has an okay comment template that I would not want to change. However I just want to insert voteup and votedown button directly below the User avartar
<ul class="comment-list">
<?php
wp_list_comments(array(
'style' => 'ul',
'short_ping' => true,
'avatar_size' => 70
));
?>
</ul>
I saw a suggestion to add a callbackfunction that would create a new theme. Using this SO here.
<?php
wp_list_comments(array(
'style' => 'ul',
'short_ping' => true,
'avatar_size' => 70,
'callback' => "custom_template"
));
?>
Then I write my function
function custom_template ($comment, $depth, $args){
?>
// Here goes my custom template
// I rely want to maintain the present structure and simply add voteup and votedown button
// Avatar --> Date --> Edit form --> Comment content --> Voteup and Votedown --> Reply form
// I would style the section to suite my needs
<?php
}
How best can I get the structure of the current form? Or can I use another method without using a callback function which I would need to enqueue or add to a helper function on my plugin?
本文标签: phpCustomize Theme comment template to Insert VoteUp and VoteDown buttons
版权声明:本文标题:php - Customize Theme comment template to Insert VoteUp and VoteDown buttons 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742212211a2433918.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论