The weight system

Difficulty: Advanced | Updated: February 16, 2014

Pro Feature
This feature let’s you to give adverts “weight”, or importance, to give them more attention (impressions) over other ads. All you have to do is set a number (weight) for each ad. There are 5 levels. Where a weight of 2 barely gets any impressions and 10 gets most of the attention. The default value is 6. As you manage your ads you can change this as a setting when editing the ad.

adrotate-weight

Note: Setting all adverts in a group to a higher or lower weight will defeat the system as all have an equal chance of being shown.

Weight overrides

Note that the weight override is a minimum weight. If you set it to 4 no ads with a lower weight will show for that location.
You can overrule set weights using shortcodes and PHP. This allows you to set all kinds of weights for each ad but set a random minimum level of weight for a certain location.

Using Shortcode

Shortcodes can be used in Posts, Pages and certain widgets.

Examples:

Groups:

[adrotate group="2" weight="6"]

Using PHP

PHP goes in your theme files. Typically index.php, single.php or page.php.

Examples:

Groups (group 12, no fallback, weight 8):

echo adrotate_group(12, 0, 8);

Groups (group 2, fallback group 2, weight 4):

echo adrotate_group(2, 2, 4);