Try to use the wp_list_comments function:
http://codex.wordpress.org/Function_Reference/wp_list_comments
It allows you to control the aspect of every comment, also the replies. Then, you define a callback function, which will be called when WordPress creates each comment.
Your callback needs to start like this:
function commnents_callback($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
global $post;
// your HTML + PHP comment creation code here
}
Then, you can create the comments by using this code:
<?php if( $comments ): ?>
<ul>
<?php wp_list_comments('type=comment&callback=commnents_callback'); ?>
</ul>
<?php endif; ?>
Using this, you can control the creation of every comment.
Related Posts:
- Calculate future date
- If modified on same day, show only time
- Display date and time in comments
- Separately formatting date elements
- Display the last date, regardless of articles
- Proper formatting of post_date for wp_insert_post?
- What’s the difference between get_the_time and get_the_date?
- Default timezone hardcoded as UTC?
- How to convert DateTime() to display time based on WordPress timezone setting?
- human_time_diff() returns “48 years ago” for all comments
- Whats the way to format a date after using get_posts()
- Converting Unix timestamp to wordpress date
- How to display date such “x ago”
- What is the best workaround for supporting all existing DATEs?
- Date format with genitive case of the month name is not working
- How to remove published date from RSS feed
- Modify Date Format to German
- How do I display posts by day?
- WordPress returns a wrong date
- How to output comments number of a post per day?
- How to add 2 hours to the wordpress time formed with current_time(“mysql”, false)?
- Finding difference in days
- How to get time difference between publish date and now?
- Use meta_query to display events by date in custom field
- Styling the date format with date_i18n
- How would I bulk change posting date?
- Exclude Duplicate Posts in this SELECT Query
- If else statement based on date_diff value
- How do you format the date as a two digit year? (ex. “10.12.10” instead of “10.12.2010”)
- How can I display the current time? [closed]
- Creating a function within functions.php to change the date
- Date and time format for UK in a custom post type [closed]
- Relative time – how to calculate difference beween post publish date and current time
- Changing “submitted on date” of comments
- WordPress outputs mm/dd but it should be opposite
- Advanced custom fields: Customise date picker’s start date (need to choose year 1500 onwards) [closed]
- How to get date using timezone saved in options? [duplicate]
- timestamp and scheduled post irregularities
- Set the publication date independent of the scheduled publication date
- Timezone UTC to PST
- Convert GMT time to local time in Gutenberg Block Editor
- Update all comments time to random dates?
- UTC/local time in Worpdress
- Convert CST published date time to MST timezone
- Placed on + only date (not time)
- Time Issue xx hours ago
- Get WordPress current date/time
- How can i display time minus 6 hours
- Show the_date with link
- Format Date for Manual Insertion into post
- Translate current_time
- Display time as “12:00 noon” instead of “12:00 pm”
- How do I make a page not visible at a certain time? [closed]
- How to amend time format of comments, using child-theme?
- How get exact time difference
- Display published time for today’s posts only
- Changing default WP-Site creation date
- wordpress blog posts’s time
- comment_date() & comment_time() not working from functions.php
- Where does the time get pulled from in the_time()
- How can I compare publish and update dates for a single post?
- In wp_list_comments comment dates won’t work?
- Human time difference in months instead of days. How?
- Bulk Updating Post Date in 1 day Increments
- Separating publish date and last modified
- How to setup language of a date in a plugin
- Show different time stamp based on time
- Default Timezone setting in WordPress – is that global?
- Date is wrong on ‘all posts’ page
- Randomizing Post Links Outside of Loop – No Author or Date
- Date time doesn’t show correctly in qTranslate [closed]
- Timed post and tweet?
- wp_dropdown_categories by date?
- wordpress built-in Jalali date convertor
- If Post Published Date or Modified Date is 1 Year or Older, Display Notice on Post Page
- How to set post date in post_type so that it’s same as latest post in category
- WordPress Translate Date Function is giving Error
- WordPress wrong dates bug
- Apply filters on date format
- get_the_date() returns english Year & Day when language is Arabic
- Compare ACF Date field to today or yesterday
- How to fix mysql2date() for 5.3.2 version?
- Can’t convert ACF datepicker value to DateTime oject – gives me a boolean
- Count time from registration date to today
- How to get Unix Local Time?
- How do you update post date (year only) in a separate custom field?
- Render the published date/time formatted in ISO 8601 using Timber (.twig)
- Change the year of the whole site
- How to display Date and Time in Tamil Language?
- Display datetime in user’s timezone
- Include post_date in search
- Display Year and Month from custom field + Age Calculator
- automatic send email at custom time
- Block post updates and deletion after a set period
- How to second orderby in “pre_get_posts” by meta value or combine single date and time to timestamp
- Advanced Custom Fields and date picker, show posts only if the day is today no matter the year
- Query sub subpages based on specific date?
- Standard API for rendering a date form
- Date is showing in unreadable format. How to convert to readable date?
- Convert custom field date format to “WordPress default”