Can I restrict In-Text ads to certain areas or pages of my website?
From Affinity
If you wish to enable ads only in certain areas of a page or selected parts of your website, you could use the “cm_filter” class to do so. To enable the filter, add “CSS class” to the applicable content (for instance, div or paragraph, as per your choice).
Case One: In case you want to choose a large amount of content on which you would like In-Text ads to be displayed, and if that is a div with an id= article; then the steps given below should help serve the purpose –
<div id= “article”>
…more HTML content …
</div>
In such a situation, all you have to do is add a class to the div as shown below –
<div id= “article” class= “cm_filter”>
…more HTML content …
</div>
If the aforementioned steps are carried out correctly, it will ensure that the ads get enabled only within the prescribed div.
Please Note: It isn’t necessary that the div element has to be an article; it could be a paragraph as well.
Case Two: In the case of an element that has been previously assigned a class, then add the ‘cm_filter’ to the class by using a space after the assigned class. Look below for an example –
<div id= “article” class=”article_text”>
…more HTML content…
</div>
In the aforementioned example, there is a class “article_text” already assigned to the div. In such cases, you can do the following –
<div id= “article” class=”article_text cm_filter”>
…more HTML content…
</div>
The only action taken here was to append the “cm_filter” to the existing class using a space.