最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Can comments by a logged-in user be displayed at the top?

programmeradmin0浏览0评论

EDIT: I answered my own question! I was able to do this using 3 lines of CSS - thanks, flexbox! leaving this here in the hopes that it helps someone else someday :)

ment-list{display: flex; flex-direction: column;}
ment-list li{order: 2;}
ment-list li.byuser{order: 1;}

--- original question ---

Working on a site where the client wants to allow commenting on posts by both members (who will be able to log in to the site) and nonmembers. They would like comments by a logged-in user to be displayed at the top of the comments list, and "guest" comments to come up below.

Is there an easy way to do this without involving a plugin?

I'm aware of the "byuser" CSS class which allows for different styling of comments by a logged-in user. This will be helpful. But wondering if there's also any way to re-order the comments.

Thanks in advance for any help!

发布评论

评论列表(0)

  1. 暂无评论