$thread['firstpostid']
<if condition == "$thread['firstpostid']"> Do something <else /> Do something else </if>