# House Ads, Codefund style codes not working

**URL:** <https://meta.discourse.org/t/house-ads-codefund-style-codes-not-working/308621>\
**Category:** Development\
**Created:** [May 19, 2024, 5:14pm UTC](https://meta.discourse.org/t/house-ads-codefund-style-codes-not-working/308621 "2024-05-19T17:14:49Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![ogulcan1787](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ogulcan1787/32/128589_2.png) [@ogulcan1787](https://meta.discourse.org/u/ogulcan1787)\
**Post date:** [May 19, 2024, 5:14pm UTC](https://meta.discourse.org/t/house-ads-codefund-style-codes-not-working/308621/1 "2024-05-19T17:14:49Z")

</div>

Hello helpful friends,

> [@House Ad Templates](https://meta.discourse.org/t/house-ad-templates/122004#between-posts-codefund-style-ad-6):
>
> House Ad Templates This guide provides templates for creating house ads using the [Official Discourse Ad Plugin](https://meta.discourse.org/t/advertising-plugin-for-discourse-serve-ads-on-your-discourse-forum/33734). warning Important: Disable ad blockers (including those built in to browsers, e.g. Brave) before working with these ad customizations. Before You Start Create a “House Ads” [theme component](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) to store: CSS for your house ads [Uploaded images](https://meta.discourse.org/t/include-images-and-fonts-in-themes-and-components/62459) used in ads Add the component to all active themes where ads will appear Optimize images using [TinyPNG](https://tinypng.com) to reduce file size while maintain…

I created a component and placed CSS codes into it. “Reklam” (Ad)

 ![Ekran görüntüsü 2024-05-19 201059](https://global.discourse-cdn.com/meta/original/4X/f/1/9/f19ed393851692be6d7bae441626b2bbc07e4c90.png)  
 ![Ekran görüntüsü 2024-05-19 201046](https://global.discourse-cdn.com/meta/original/4X/5/c/b/5cb4a0bc2a475eb747ca3a1d3c55266cda03bb6a.png)

House ads in ads plugin.

 ![Ekran görüntüsü 2024-05-19 201253](https://global.discourse-cdn.com/meta/original/4X/e/1/7/e17abd9190ab0cb1910b21315dd9263a3d7e58e1.png)

Where am I making a mistake? Or are the codes not working?

 ![Ekran görüntüsü 2024-05-19 201400](https://global.discourse-cdn.com/meta/original/4X/8/a/e/8ae87d345fbfdfc15c28aa382a15285f6a227b1d.png)  
 ![Ekran görüntüsü 2024-05-19 201405](https://global.discourse-cdn.com/meta/original/4X/5/2/6/52627cb418106e537c42a662740dcecd4157f155.png)  
 ![Ekran görüntüsü 2024-05-19 201418](https://global.discourse-cdn.com/meta/original/4X/e/b/8/eb89ff013685fa3c4a133f2819bd19c6408dcb43.png)

HTML

```plaintext
<a class="between-posts-ad" target="_blank" rel="noopener" href="https://discourse.org">
  <div class="ad-container">
    <span class="ad-label">Ad</span>
    <strong>Discourse</strong> - A community platform for civilized discussion on the web 
  </div>
</a>

```

CSS

```plaintext
.house-creative.house-post-bottom {
    margin-left: 0 !important;
    a.between-posts-ad {
        color: var(--dynamic-color);
        strong {
            color: var(--primary);
        }
        .ad-container {
            max-width: calc(#{$topic-avatar-width} + #{$topic-body-width} + (#{$topic-body-width-padding} * 2));
            padding: 10px 5px;
            text-align: center;
            background-color: var(--primary-very-low);
            border: 1px solid var(--primary-low);
            box-sizing: border-box;
            .ad-label {
                margin-right: 2px;
                padding: 2px 5px;
                color: var(--primary-very-low);
                font-weight: bold;
                background-color: #EAC34E; // Sets color of "Ad" label
                border-radius: 5px;
            }
        }
    }
}

```

Color Definitions ?

```plaintext
$dynamic-color: dark-light-choose($primary-medium, $secondary-medium);

:root {
  --dynamic-color: #{$dynamic-color};
}

```

---

_[View the full topic](https://meta.discourse.org/t/house-ads-codefund-style-codes-not-working/308621)._
