AdSanity ads or ad groups can be added to pages or posts via shortcodes.
First, you’ll want to navigate to to the Plugins section of your dashboard. (fig. 1) From that page you’ll select “Add New” and then you will be sent to the Add Plugins page and you’ll see a listing of featured plugins. You’ll want to click on the “Upload Plugin” button at the top of the page. (fig. 2) You’ll then click “Choose File” and then to select the zip file that you downloaded on the AdSanity plugin site and click on “Install Now.”
In addition, you can click a link to copy the shortcodes from the Manage Ads page, individual ad pages, or from the Ad Groups page.
Shortcode Reference
One of the methods of placing ads on pages that AdSanity supports is via shortcodes. We provide shortcode builders for single ads and ad groups in the core AdSanity plugin. Additionally, shortcode builders are added to the classic WordPress editor when you install the Ordered Ad Group Widget Add-On and the Rotating Ad Widget Add-On. These builders allow you to quickly add the shortcode to your pages. However, you may want to add your shortcodes manually and this reference breaks down the attributes in each of the shortcodes.
Single Ad Shortcode
The single ad shortcode consists of three parameters; id, align, and max_width (which is optional).
Example [adsanity id="107" align="alignleft" max_width="100"/]
- Le paramètre adsanity id a une valeur égale au numéro d'id de l'annonce en cours.
- Le paramètre align peut prendre les valeurs suivantes : alignleft, alignright, aligncenter, ou alignnone.
- Le paramètre max_width a une valeur égale à la largeur de pixel que vous saisissez.
Ad Group Shortcode
The ad group shortcode has six parameters; num_ads, align, num_columns, group_ids, and max_width (which is optional). Note: displaying a single random ad from a group is as simple as setting your num_ads and num_columns parameters to 1.
Example [adsanity_group num_ads="1" align="alignleft" num_columns="1" group_ids="2" max_width="100" random="1"/]
- Le paramètre adsanity_group num_ads a une valeur égale au nombre d'annonces du groupe que vous souhaitez afficher.
- Le paramètre align peut prendre les valeurs suivantes : alignleft, alignright, aligncenter, ou alignnone.
- Le paramètre num_columns a une valeur égale au nombre de colonnes que vous spécifiez.
- Le paramètre group_ids a une valeur égale au numéro d'identification du groupe de publicités utilisé.
- Le paramètre max_width a une valeur égale à la largeur de pixel que vous saisissez.
- Le paramètre aléatoire a une valeur de 1 (pour une randomisation) ou 0 (pour aucune randomisation).
Rotating Ad Shortcode
The rotating ad shortcode has five parameters; align, time, group_id, and max_width (which is optional).
Example [adsanity_rotating align="alignleft" time="10" group_id="2" max_width="100" random="1"/]
- Le paramètre adsanity_rotating align peut prendre les valeurs suivantes : alignleft, alignright, aligncenter ou alignnone.
- Le paramètre time a une valeur égale à l'intervalle de rotation que vous spécifiez en secondes.
- Le paramètre group_id a une valeur égale au numéro d'identification du groupe de publicités utilisé.
- Le paramètre max_width a une valeur égale à la largeur de pixel que vous saisissez.
- Le paramètre aléatoire a une valeur de 1 (pour une randomisation) ou 0 (pour aucune randomisation).
Ordered Ad Group Shortcode
The order ad group shortcode has four parameters; ad_ids, num_columns, align, and max_width (which is optional).
Example [adsanity_ordered ad_ids="105,107,104,106" num_columns="1" align="alignleft" max_width="200" /]
- Le fichier adsanity_ordered ad_ids est constitué des identifiants de l'annonce dans l'ordre dans lequel vous souhaitez qu'ils apparaissent, séparés par des virgules.
- Le paramètre num_columns a une valeur égale au nombre de colonnes que vous spécifiez.
- Le paramètre align peut prendre les valeurs suivantes : alignleft, alignright, aligncenter, ou alignnone.
- Le paramètre max_width a une valeur égale à la largeur de pixel que vous saisissez.
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.