House Ads, Codefund style codes not working

AI-generated summary

A user is having trouble with Codefund-style ad codes not working in House Ads. ogulcan1787 explains they’ve added CSS and HTML for a between-posts ad, but it’s not appearing. Arkshine points out the issue: the ad is set for the ‘Between Posts’ setting, but the CSS selector used is for the ‘Topic List’ setting. ogulcan1787 realizes the mistake and asks how to apply the ad to other areas.

Hello helpful friends,

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


House ads in ads plugin.

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



HTML

<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

.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 ?

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

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

Did you select the Ad in the Between Posts setting?

hi @Arkshine yes I did

You’re using code for:

image

And you selected (Topics list):

image

Instead of (I would assume):

image

The CSS selector won’t be the same depending on what you choose.

It’s my fault, I’m sorry. I didn’t realize it was just for that area. What do I need to do to add it to other fields?