How to display full name in comments embeds

In the embedded topics iframe, the user’s username is displayed instead of the full name. I have configured all the admin settings to display full name. but it’s not working?

Any sugguestions?


CleanShot 2022-05-24 at 15.45.33

2 Likes

For anyone else also looking to modify:
/var/www/discourse/app/views/embed/comments.html.erb

1 Like

Hi @j3ang , can you maybe let me know the change you have made in the file to accomplish this? I tried changing username to fullname but that didn’t work.

OK, some more trial and error brought this: change <%= post.user.username %> to <%= post.user.name %> — simple, but you just have to know it…

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Important note: if you want to override Discourse’s files, you need to use either a theme component or a plugin.

A good example of what you’re trying to do can be found here:

1 Like