XF 2.3 Ad displaying multiple times

Maa

Active member
Hi,

I have an advert placement which is after first post on every page, but it's displaying twice after the 2nd page - after the first post and the 2nd page.

Please could someone assist? Code is;

Code:
<xf:if is="$thread.node_id == '95'">
        <xf:if is="{$post.position} % {$xf.options.messagesPerPage} == 0">
            <div style="margin: 30px; text-align: center;">
                <a href="link" target="_blank">
                    <img src="link" alt="" style="width: 100%; max-width: 728px;" />
                </a>
            </div>
        </xf:if>
    </xf:if>
 
I show some custom text on the first post in some nodes and I use this <xf:if is="$post.isFirstPost() AND in_array({$thread.node_id}, [189,192,190])">MYTEXT</xf:if>

I hope it will help you, it works perfect tho it shows only in the first post of my selected nodes
 
  • Like
Reactions: Maa
I show some custom text on the first post in some nodes and I use this <xf:if is="$post.isFirstPost() AND in_array({$thread.node_id}, [189,192,190])">MYTEXT</xf:if>

I hope it will help you, it works perfect tho it shows only in the first post of my selected nodes
Thanks but my ad shows after first post, not within.
 
Thanks, the issue is that I have "sticky post" addon so first post is displayed on every page.

I need it so that it only displays after first post on every page with the sticky addon enabled.

Hope it makes sense
 
Thanks, the issue is that I have "sticky post" addon so first post is displayed on every page.

I need it so that it only displays after first post on every page with the sticky addon enabled.

Hope it makes sense
Then what you use is not wrong as it follows the first post position, I assume the solution is to not have sticky the first post
 
Back
Top Bottom