admin管理员组

文章数量:1327068

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