Jump to content

Load custom ad location only if posts > x?


NeedCoffee

Recommended Posts

In our 'topic' template, we've added a custom ad location like this:

{advertisement="footerad"}

This shows an add below the quick reply box.

We're new to IPB and I've done some searching, but everything I've found so far is too complex for what we need.

All we want to do is wrap that tag in a conditional, so that it only appears if the topic has at least X replies. This stops us showing too many ads on topics with not many replies. We also have one ad after first post, so we don't really want to show the footer ad when there is only one post for example. But really we would like to specify the amount of posts in the conditional statement so we can tweak this.

Thanks in advance guys and apologies if I've overlooked a thread where this (conditional based on replies to a topic) is explained.

Link to comment
Share on other sites

On 11/23/2018 at 4:15 AM, NeedCoffee said:

Ah that's a shame - would be nice to have some documentation for this kind of stuff.

@A Zayed can I be cheeky then and ask if there's a similar one we can use on forum page (showing the list of topics)?

It's not this is simple is it?


{{if count( $topics ) > 1 }} Show Ad. {{endif}}

 

Where do you want to show the ad. exactly? in which template?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...