House Ad Templates

Hi pfaffman,

After reading your post. I asked google gemini for the code to use in ccs and HTML.

However it is not displaying the ads at all now.

This is the CSS it said to use but I am not sure if it is correct.

/* -------------------------------------------------------------------------- */
/* CSS to control which ads are displayed in which categories */
/* -------------------------------------------------------------------------- */

/* Initially hide all category-specific ads.  The [class*="-ad"] selector is more general */
.house-ad[class*="-ad"] {
  display: none;
}

/* Homepage Ad (if you have one - adjust the body class if needed) */
body.list-latest .house-ad.homepage-ad,
body.list-top .house-ad.homepage-ad {
  /* body.list-latest  and body.list-top are common Discourse classes for "Latest" and "Top" */
  display: block;
}

/* Category Specific Ads */
body.category-community-support .house-ad.category-community-support-ad {
  display: block;
}
body.category-general .house-ad.category-general-ad {
  display: block;
}

Is there any chance you could let me know what css you used or if what I posted looks correct?

This is the HTML

<div class="house-ad category-community-support-ad">
  <a href="DESTINATION_URL" class="banner-ad" target="_blank">
    <img class="desktop" src="DESKTOP_IMAGE_URL">
    <img class="mobile" src="MOBILE_IMAGE_URL">
  </a>
</div>