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

XF 1.1 Display Ads After First & Every Fifth Post On All Pages In Thread

Brogan

XenForo moderator
Staff member
#2
Use two different conditional statements.

<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">
Advert 1 here​
</xen:if>

<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 4 AND !{$message.conversation_id}">
Advert 2 here​
</xen:if>