This article provides a detailed explanation of each setting found in AdContent > Code Generator.
Table of contents
Select the type of settings. You can select the following options:
- Default. In this mode, only the basic settings are available. This mode is recommended for most users.
- Advanced. In this mode, all settings are available. This mode is for advanced users only.
Turn on this setting and save the settings to reset all fields in the Code Generator. It can be useful when you generate a new code to display ads.
Use this code to display ads on the site. You can use this code in the post content, widgets, themes and plugins.
Number of ads
Enter the number of ads to receive. Set -1 to receive all ads.
Enter space-separated CSS classes for the container of ads. Leave this field blank to disable the container.
Select a sort order for the ads. You can sort ads by:
- Date modified.
- Included IDs.
Select a sort direction. You can select the following options:
- ASC (ascending order).
- DESC (descending order).
Turn on this setting to enable Ajax for the
Enter the number of milliseconds to set the timeout for the Ajax request.
Select ad groups to receive ads assigned to the selected ad groups.
Select ad formats to receive ads assigned to the selected ad formats.
Select user roles to display ads only to users with the selected roles.
Select the ads you want to include in the query. If you use this field, the generated code will receive the selected ads regardless of the settings selected.
Select the ads you want to exclude from the query.
Select the ads you want to receive by default (if there are no relevant ads).
These fields are available only in advanced settings mode and are intended for advanced users only. If you set any of these fields, this will disable the automatic detection of the corresponding parameter, and the plugin will use the value you specified. For example, if you select “Mobile” in the “Device Types” field, the generated code will always display ads for mobile devices, regardless of what type of device is actually used. Keep this in mind when working in advanced settings mode.
Select the countries for which you want to receive ads.
Select the types of devices for which you want to receive ads.
Enter the ID of the post for which you want to receive ads.
Taxonomy Term ID
Enter the ID of the taxonomy term for which you want to receive ads.
Select the types of pages for which you want to receive ads.