WP Online Active Users Documentation

In this guide & related topics
Shortcodes

Add a shortcode to your website

Choose the right shortcode and place it in WordPress or your page builder.

4 min read Product guide

Choose the right shortcode

A shortcode is a small instruction in square brackets. WordPress replaces it with the output registered by an active plugin. Use it when you want to place a plugin feature inside your own page layout.

  • [webi_active_user] — site-wide active signed-in user count, supplied by the free plugin.
  • [wpoau_live_viewers] — current-page viewer badge, supplied by the enabled live-viewers module.
  • [wpoau_my_sessions] — the current user’s browser-session controls, supplied by the enabled session module.

Use the WordPress block editor

  1. Edit the page where you want the output.
  2. Add a Shortcode block.
  3. Paste one shortcode as plain text, including both square brackets.
  4. Save and preview the frontend with the required login and feature settings.

Do not use a Code block for working output: a Code block is intended to display source text.

WordPress block editor showing the Online Active Users block in search results.
WordPress block editor showing the Online Active Users block in search results.

Use Elementor or the classic editor

In Elementor, use its Shortcode widget. In the classic editor, paste the shortcode into the page content. Use a shortcode-capable widget elsewhere; arbitrary HTML fields or plain template text may not process shortcodes.

These plugin handlers do not define shortcode attributes. Do not add invented options such as show_guests, user_id or color. Use the feature’s settings instead.

Check the result

Preview the published page. A logged-out view can intentionally be empty for account-related shortcodes. The live-viewers shortcode also requires an eligible public page. See the individual guide for its prerequisites.