Advertisements

Advertisements are reusable promotional blocks — a banner, a text promotion or a snippet from an advertising network — that you create once and then place anywhere on the site: in a widget area (sidebar or footer) or directly on a page with the Page Builder.

Advertisements list with text, image and code advertisements

Advertisements → Manage Advertisements. Every advertisement has a type, an active/inactive status and edit and delete actions.

How advertisements work

An advertisement is a record that holds the content of a promotion. It is not shown anywhere until you place it. You can place the same advertisement in as many locations as you like; when you edit the record, every location updates at once, and when you switch it off, it disappears from every location.

Create the advertisement → Place it (widget or page block) → Switch it on → Check the public page

The three advertisement types

TypeWhat visitors seeFields
Text advertisementA card with your title, the web address it links to (shown as the site name) and a short description. If you add an image, it appears above the text. Clicking opens the target page in a new tab.Name, Title, Description, Target URL, Image (optional)
Image advertisementA picture that links to your target address. Use it for banners.Name, Title, Target URL, Image
Code advertisementWhatever the code produces, exactly as written. Use it for advertising-network snippets, newsletter sign-up boxes, countdown banners or any custom HTML.Name, Title, Code
FieldUsed for
NameAn internal label so you can find the advertisement in lists and pickers (for example Summer glow banner). Required, and it must be unique. Visitors never see it.
TitleThe headline of a text ad and the picture description (alt text) of an image ad. Required, up to 90 characters. Keep it short and descriptive.
DescriptionThe supporting line of a text ad.
Target URLWhere a click goes. Use a full address (https://…) for outside sites, or a site path such as /shop. Text ads open in a new tab and are marked nofollow so search engines do not treat them as editorial links.
ImageThe picture to upload. For image ads choose a size that suits the place it will appear: a wide banner in a page, a square or portrait picture in a narrow sidebar.
CodeHTML or JavaScript inserted into the page as it is. Only paste code from sources you trust, because it runs in your visitors’ browsers.

Creating an advertisement

  1. Open Advertisements in the admin menu. The menu offers Create Text Ad, Create Image Ad, Create Code Ad and Manage Advertisements.
  2. Choose the type you need. The form shows only the fields of that type.
  3. Fill in the fields and save. You return to the list with a confirmation message.
  4. New advertisements are active by default. Place the advertisement as described below.

The type cannot be switched later

An advertisement keeps the type it was created with. To change a text ad into an image ad, create a new advertisement of the other type.

Managing the list

Column / controlMeaning
SearchFinds advertisements by name or title.
ID, Name, TitleIdentify the advertisement.
ImpressionsA counter stored with the advertisement. TruCMS does not increase it automatically as pages are viewed, so for real statistics use the reports of your advertising network (code ads) or your analytics tool (see Integration).
TypeText, Image or Code advertisement.
StatusActive advertisements can be shown; Inactive ones are hidden everywhere without being deleted. Click the status badge to switch it.
Edit / DeleteEdit the content, or delete the record. A deleted advertisement vanishes from every place that used it.

Where advertisements can be placed

There are two ways to show an advertisement. Use whichever fits the layout; you can use both at the same time.

1. In a widget area with the Advertisement widget

Open Appearance → Widgets, select the Advertisement widget, choose the widget area (for example Blog for the sidebar next to posts, or Footer Area 2) and add it. In the widget, pick the advertisement to show. Because widget areas appear on many pages, this is the way to run a promotion across a whole section of the site. See Widgets.

2. On a single page with the Page Builder

In the Page Builder, open the Content blocks and drag Advertisements onto the page. With the block selected, open its settings and choose the advertisement in the Advertisement field (a searchable list of your active and inactive advertisements by name). The editor shows a live preview. This is the way to put an advertisement inside a landing page, between sections, or next to a particular block of text. See Dynamic Blocks & Shortcodes for how blocks like this work.

Which one should I use?

Use a widget when the promotion belongs to a place that repeats (every blog post, every footer). Use the page block when it belongs to one specific page. If an advertisement is inactive, the widget or block shows nothing, so there is no empty gap to fix.

When an advertisement is edited, switched on or off, or deleted, TruCMS refreshes its stored copy automatically, so changes appear on the site straight away (unless a separate page cache is serving an older copy — see the FAQ).

Good practice

Permissions

Access follows the role permissions manage advertisements, create advertisements, edit advertisements and delete advertisements. The Super Admin role has them all.

Widgets · Page Builder · Dynamic Blocks & Shortcodes · Integration · Frequently Asked Questions