# Single Ads

### Displaying Single Ads&#x20;

#### Display Ads using Short Code&#x20;

* Copy shortcode for the ad from the **Manage Ads** tabl&#x65;**.**
* Paste copied shortcode in the editor as shown in the image below.

![](https://456431625-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhZhxDAXbXHWmZ3dUIK%2F-M_tRx09IR5gw5BdgioR%2F-M_tWSbZuWPL_dxkoBUt%2Fnew%20single%20ad%20shortcode.png?alt=media\&token=201f8bff-8fe3-4fdd-a456-5e5ccf7a0a11)

* Shortcode for reference : \[wpadcenter\_ad id=139 align='none' max\_width='on' maxwidth\_value=300 devices=mobile,tablet,desktop]&#x20;
* Alignment can be specified by providing the values as "left", "right", "center" or "none".
* 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.
* After adding the shortcode, click on **Publish**/**Update** button.

#### Display Ads using Gutenberg Block

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

* To display Ads using Gutenberg block, add the **WPAdCenter Single Ads** block to 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%2FXVVsCFJqgPRnemC7zmNz%2Fsinglead2.png?alt=media\&token=4daee57e-751c-4c1f-ba9a-e01e99a678c4)

* From here you can select the ad that you wish to display and specify alignment for the ad.
* To provide maximum width for an ad, enable the **Max Width** option and provide a maximum width value.
* 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.
* Once the ad and alignment are set you can click on **Publish**/**Update** button.

#### Display Ads using Widgets

* To display ads using the widget, select the **WPAdCenter Single Ads** widget as shown in the image below.

![](https://456431625-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhZhxDAXbXHWmZ3dUIK%2F-M_tRx09IR5gw5BdgioR%2F-M_tZmuP_D9i_CYDwlIO%2Fnew%20single%20ad%20widget.png?alt=media\&token=94daf56a-03ec-4e68-843a-e6db21e345cb)

* You can specify the title of the ad.
* Select ad from the drop-down.
* To provide maximum width for an ad, enable the **Max Width** option and provide a maximum width value.
* To display ads on specific devices, select the corresponding checkboxes.
* Click on the **Save** button.

**Display Ads using Widget for WordPress v5.8+**

Since the WordPress version 5.8 introduced **"block as a widget feature"**, the WPAdCenter Single Ads widget has been replaced by its Gutenberg block. Please refer to screenshots below in order to place blocks in your widget area

![](https://456431625-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhZhxDAXbXHWmZ3dUIK%2F-Mj7wPPPLLisvRlTyL4c%2F-Mj8-PAKJkscvNphTgui%2Fscreenshot-two.wordpress.test-2021.09.09-10_39_48.png?alt=media\&token=329fed81-2788-4a5e-85e3-f6d65d2adf36)

please refer to above '**Display Ads using Gutenberg Block**' for further options.

#### Display Ads using Elementor

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

* Select **WPAdCenter Single Ad** widget, it is present under general widgets.

![](https://456431625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LhZhxDAXbXHWmZ3dUIK-754427264%2Fuploads%2Fnzhg9x6R6Q8LCu4FpkjM%2Fsinglead1.png?alt=media\&token=c0bc5706-90e2-43c9-85ee-d657a479e1e2)

* Here you can select the ad to be displayed from the dropdown.
* Also, you can specify the ad alignment and preview changes in real-time.
* To provide maximum width for an ad, enable the **Max Width** option and provide a maximum width value.
* 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.
