vozovi.rs
Home

For news sites and blogs

Live train departures widget for your website

Show your readers the next trains from a station, on a route or the free Petrovaradin bus, right inside the article. Pick the look below, copy two lines of code, and the widget keeps itself up to date.

Site background

Your news siteTravel updates

Novi Beograd station closed until the end of the year: where to board now

From 9 September passengers board and leave trains at Tošin bunar instead.

Link that stays in your article: Tošin bunar: live departures on vozovi.rs

Widget

Colour

Theme

Corners

Size

Width

Language

Your code

Updates as you change the options

<a class="vozovi-widget"
   href="https://vozovi.rs/en/stanica/tosin-bunar"
   data-widget="stanica" data-id="tosin-bunar"
   data-lang="en">Tošin bunar: live departures on vozovi.rs</a>
<script async src="https://vozovi.rs/embed.js"></script>

Installation

No plugin and no account. The code is a normal link plus one script, so it works anywhere an article accepts HTML.

WordPress, block editor

  1. Add a block and choose "Custom HTML".
  2. Paste the code.
  3. Update or publish the post.

WordPress, classic editor

  1. Switch the editor to the "Text" tab.
  2. Paste the code where the widget should appear.
  3. Update the post.

Elementor and page builders

  1. Drag in an "HTML" or "Embed code" element.
  2. Paste the code.
  3. Save and publish.

Any other site or plain HTML

  1. Paste the code wherever the article accepts HTML.
  2. With several widgets on one page the script loads once.
  3. The link works even if scripts are blocked.

Options

Each option is an attribute on the link. Leave one out and its default applies; the studio above only writes the ones you change.

AttributeValuesDefaultWhat it does
data-widgetstanica, relacija, autobusrequiredStation departures, next trains on a route, or the Petrovaradin bus.
data-idtosin-bunar, beograd-novi-sad, petrovaradin-novi-sad…requiredThe station or route slug from its vozovi.rs address. For the bus: petrovaradin-novi-sad or novi-sad-petrovaradin.
data-themelight, dark, autolightauto follows the light or dark setting on the reader's device.
data-accentgreen, blue, red, violet, orange, blackgreenColour of the live dot, the next departure and the link.
data-radiusround, soft, squareroundCorner shape of the card and rows.
data-sizeregular, compactregularcompact uses smaller rows and hides the second line.
data-widthauto, fullautoauto caps the widget at 520 px, full fills the column.
data-langsr, ensrLanguage of the widget labels.
data-limit3 to 85Departures shown at once. Station and route widgets only.

When it does not work

Only the link shows, no widget

Your site blocks third-party scripts or frames. Allow https://vozovi.rs in the Content-Security-Policy under script-src and frame-src.

The widget says it was not found

The data-widget or data-id value has a typo. Copy the code again from the studio above.

AMP pages

AMP does not run the loader script, so AMP versions show the plain link. The regular page shows the widget.

Privacy and speed

The widget is a small, self-contained HTML page with no ads, analytics or cookies. It loads lazily, only when it scrolls into view.

Frequently Asked Questions

Is the vozovi.rs widget free to use?

Yes, for any website and with no sign-up. We only ask that the link under the widget stays visible and keeps its text.

Does the train widget set cookies on my site?

No. The widget carries no ads, no analytics and no cookies, so your consent banner and privacy policy stay as they are.

How often does the widget refresh its data?

Departed trains drop off straight away, and every minute the widget reloads the Srbija Voz timetable and passenger delay reports.

Can I match the widget to my site design?

You can pick one of six colours, a light, dark or automatic theme, the corner shape, a compact size and full width. Everything is set on this page and the code follows along.

Need another station, route or size? Get in touch.

Cookies

We use cookies to analyse traffic and improve your experience, as well as for content and marketing personalisation. You can accept all cookies or customize your preferences. Details in our privacy policy.