# Rotating Ad Group (Pro)

### Displaying Rotating Ads

#### Display Rotating Ads using Gutenberg Block

{% hint style="danger" %}
Please note that the Gutenberg Block for displaying Rotating Ads will be deprecated soon. Refer <https://docs.wpeka.com/wp-adcenter/placing-ads/placing-ad-using-consolidated-block-elementor-widget> to replace the Rotating Ads Gutenberg block with the Consolidated Ad Gutenberg Block.
{% endhint %}

* Select **WPAdcenter Rotating Ads** block in the editor as shown in the image below.

![](https://456431625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LhZhxDAXbXHWmZ3dUIK-754427264%2Fuploads%2FUYijom9gHubIxbYCTumv%2Frotatingads2.png?alt=media\&token=250fd57e-9ad6-4b4b-8fdc-52847f99fd53)

* Select an Ad group from which the rotating ads will be fetched.
* Specify the time span between each rotation.
* Specify alignment for the ad.
* To provide maximum width for an ad, enable the **Max Width** option and provide a maximum width value.
* Enable **Order Randomly** option to fetch ads in random order, by default the ads will be fetched as per the published date.
* To display ads on specific devices, select the corresponding checkboxes. The changes will take effect on the preview page or live page and not while editing.
* Click on **Publish**/**Update** button.

#### Displaying Rotating Ads using Shortcode

* Shortcode for reference: \[wpadcenter\_rotating\_adgroup adgroup\_id=2 time=2 align='center' random\_order='on' max\_width='on' max\_width\_value=300 devices=mobile,tablet,desktop]

![](https://456431625-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhZhxDAXbXHWmZ3dUIK%2F-M_tqFamdFpcQEANHyxZ%2F-M_trhoHbKC42vikHPjV%2Fnew%20rotating%20shortcode.png?alt=media\&token=04a4da64-16c5-44ee-afa2-94c129e485ed)

* Specify the ad group ID from which rotating ads will be fetched.
* Specify the time span between each rotation using the time attribute.
* Alignment can be specified as "left", "right" and "center".
* Set random order as **on**, if the ads should be fetched in random order. If not specified or set to **off**,\
  ads will be ordered as per the published date.
* Max width can be set to  "on" or "off".
* Max Width Value is the value in pixels.
* To display ads on specific devices, specify the names of devices. If the 'devices' attribute is not provided the ad will be shown on all devices.
* Click on **Publish**/**Update** button to save the shortcode.

#### Displaying Rotating Ads using Elementor

{% hint style="danger" %}
Please note that the Elementor Widget for displaying Rotating Ads will be deprecated soon. Refer <https://docs.wpeka.com/wp-adcenter/placing-ads/placing-ad-using-consolidated-block-elementor-widget> to replace the Rotating Ads Elementor widget with the Consolidated Ad Elementor widget.
{% endhint %}

* Select **WPAdcenter Rotating Ads** widget which is present under **General** category.

![](https://456431625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LhZhxDAXbXHWmZ3dUIK-754427264%2Fuploads%2FXL5a3hiwTM3gwfCxa2FW%2Frotatingads1.png?alt=media\&token=8cc34e32-c60b-49cc-8c30-a99f64c458e2)

* Select the ad group from which rotating ads will be fetched.
* Specify alignment for the ad.
* Specify the time span between each rotation.
* To provide maximum width for an ad, enable the **Max Width** option and provide a maximum width value.
* Enable **Order Randomly** option to fetch ads in random order, by default the ads will be fetched as per the published date.
* To display ads on specific devices, select the corresponding checkboxes. The changes will take effect on the preview page or live page and not while editing.
* Click on **Publish**/**Update** button.

#### Displaying Rotating Ads using Widget

* Select **WPAdcenter Pro Rotating Ad** widget as shown in the image below.

![](https://456431625-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhZhxDAXbXHWmZ3dUIK%2F-M_tqFamdFpcQEANHyxZ%2F-M_txyvWbFzETiMhHpnW%2Fnew%20rotating%20widget.png?alt=media\&token=db8c169b-d765-4b93-88a0-abe4d3266975)

* Provide a title for the widget.
* Select an ad group from which the rotating ads will be fetched.
* Specify the time span between each rotation.
* Specify alignment for the ad.
* To provide maximum width for an ad, enable the **Max Width** option and provide a maximum width value.
* Enable **Order Randomly** option to fetch ads in random order, by default the ads will be fetched as per the published date.
* To display ads on specific devices, select the corresponding checkboxes.
* Click on the **Save** button.
