As we know we can usually make changes to "the content" by calling the_content(). is there any equivalent function available for comments? or any such way do you know?
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
I do hope I understand what you're asking, as you're not giving much information. From what I specifically to customize the output of your comments. Well, there partially is. The wp_list_comments accepts a callback argument among several others. This callback allows you to run a custom function; in your case, a custom function to manipulate the comments' markup/output. So, let's get started. Assuming your HTML structure looks somewhat like this:
Then, you would create a function called *custom_comments*, that would look something like this: function custom_comments($args, $comment, $depth) { // your code.. // example from DigWP: http://pastie.org/2986583 } Hope that helps! |
|||
|
|
|
This codex lists many functions for comments. |
|||
|
|