XF 2.2 How Place Ads Inside First Post


New member

I'll like to place ads inside the forum's first post (either left-aligned or right-aligned). Is there any mod or code to achieve this?

I have tried editing the thread_view template but couldn't get the ad to show inside the post. The closest I could get was beside the "watch" button which is far from what I'm looking at, and the Digital Point Ad Positioning add-on that does something similar isn't available for 2.X.

Note: I'll be fine with knowing the line (in thread_view template) where I can place an ad code and have it show up inside the thread.

Ad code example:

<div style="text-align:left;">
    ad code here


  • place ads inside post.png
    place ads inside post.png
    36.1 KB · Views: 5


XenForo moderator
Staff member
Use one of the built in ad positions:


Wrap the ad in a conditional statement so it only shows in the first post:

<xf:if is="$post.position == 0">
    Ad here