I’ve found that using:
add_filter( 'comments_array', 'array_reverse');
Does exactly what I want in terms of displaying comments from newest-oldest. However, I want to give users the option of doing this on-the-fly. The best I’ve been able to manage is using a dropdown box to modify an option in the theme but due to the timing of the option being modified vs. the comments being loaded, it requires not one but TWO page refreshes in order to display correctly.
If I could get the comments to reorder on a single page refresh I’d be happy. If I could get them to reorder using AJAX without refreshing at all I’d be really happy!
- The topic ‘Using AJAX to reorder comments on the fly?’ is closed to new replies.