One of the things we get asked about a lot is how to avoid detection from Ad Blockers. While we’ve explained other options to respect those visitor’s ad display preferences, we understand that there are some instances that you aren’t using AdSanity for typical advertising. Maybe you’re just using AdSanity to track views and clicks on Image based content, for example. We provide you with a couple of methods to modify the display of individual ads, groups of ads, or all ads.

Estilización de bloques de anuncios

Each Ad Unit has a number of CSS Classes and a unique HTML ID that you can target in your theme’s CSS to change its look. The format of these are:

  1. ad-{size} (ejemplo: ad-125x125) – This allows you to style all ads of the same size
  2. column-{column number} (ejemplo: column-2) – While relevant only to groups of ads, this allows you to style all ads in a particular column
  3. alignleft | aligncenter | alignright | alignnone – These four styles are generally already handled inside of most themes, but if you want to apply additional styles to better handle alignment, this is the place to do so. Note: only one class will be added to each ad unit.

If all of those classes don’t suit your needs or you want to change them, you can attach additional classes to each Ad Unit using a filter as described below.

Hay algunas acciones y filtros relacionados con la visualización integrados en nuestro sistema de plantillas. Estos le permiten filtrar clases CSS y añadir marcas alrededor del bloque de anuncios para que pueda darle estilo.

Filtros

Acciones

Plantillas temáticas

Sometimes you need to have more control over the markup for your ads. We’ve extended WordPress Core’s template hierarchy to allow you to fully customize an ad’s markup through a theme template.

Si desea cambiar el marcado de todos los anuncios, simplemente copie el archivo ad.php del archivo theme-templates en tu tema y personalízalo.

If you want to modify the markup for all ads of a particular size, you can rename that file to something like ad-125×125.php, where 125×125 is the size that you’re trying to modify. Note: you can find the size by looking at the classes that are applied to the ad in the markup.

Por último, si desea cambiar el marcado de un anuncio en particular, puede cambiar el nombre del archivo a ad-1234.php, donde 1234 es el ID del anuncio que desea modificar. Nota: puede encontrar el ID mirando el ID HTML que se aplica al anuncio en el marcado.

Didn’t find what you were looking for?

If you’re a subscriber to AdSanity and don’t find an answer to your specific question please submit a request and our support department will address your issue quickly.