XF 2.2 How to hide usertitles unless they're custom?

Ludachris

Well-known member
What would be the correct way to go about hiding the default user titles in posts, except if they are custom user titles?
 
Edit the message_macros template.

Change line 16 from this:
HTML:
<xf:usertitle user="$user" tag="h5" class="message-userTitle" banner="true" itemprop="jobTitle" />

To this:
HTML:
<xf:if is="$user.custom_title"><xf:usertitle user="$user" tag="h5" class="message-userTitle" banner="true" itemprop="jobTitle" /></xf:if>
 
Edit the message_macros template.

Change line 16 from this:
HTML:
<xf:usertitle user="$user" tag="h5" class="message-userTitle" banner="true" itemprop="jobTitle" />

To this:
HTML:
<xf:if is="$user.custom_title"><xf:usertitle user="$user" tag="h5" class="message-userTitle" banner="true" itemprop="jobTitle" /></xf:if>
🤘 thanks Brogan! Every time I type your name I want to type "Brotatochip" - it's from a commercial here in the states. :)
 
Top Bottom