# 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.

![](/files/-M_tWSbZuWPL_dxkoBUt)

* 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.

![](/files/APjJUaF2ynzcKEUMfdK7)

* 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.

![](/files/-M_tZmuP_D9i_CYDwlIO)

* 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

![](/files/-Mj8-PAKJkscvNphTgui)

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.

![](/files/TWHq6dJ82ZGaZCPwN3GS)

* 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wpeka.com/wp-adcenter/placing-ads/single-ads.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
