• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Custom Username

Mike Edge

Well-known member
#1
I'm trying to do the following, but it is just showing the code on the site.

Code:
    <h3 class="userText">


   <xen:if is="{$post.user_id} == 1">
    {
      Hi I am a custom name
      } else {
  <xen:username user="$user" itemprop="name" rich="true" />
      }
</xen:if>
            <xen:if hascontent="true">
 
Last edited:

Liam W

Well-known member
#2
HTML:
<h3 class="userText">
    <xen:if is="{$post.user_id} == 1">
        custom username
    <xen:else />
        <xen:username user="$user" itemprop="name" rich="true" />
    </xen:if>
    <xen:if hascontent="true">
    ...
</h3>