Title: A Random Number
Author: Mortgage Calculator
Published: <strong>12. Januar 2016</strong>
Last modified: 27. Oktober 2026

---

Plugins suchen

![](https://ps.w.org/a-random-number/assets/banner-772x250.png?rev=3763038)

![](https://ps.w.org/a-random-number/assets/icon-256x256.png?rev=3763038)

# A Random Number

 Von [Mortgage Calculator](https://profiles.wordpress.org/mlcalc/)

[Herunterladen](https://downloads.wordpress.org/plugin/a-random-number.1.3.0.zip)

[Live-Vorschau](https://de.wordpress.org/plugins/a-random-number/?preview=1)

 * [Details](https://de.wordpress.org/plugins/a-random-number/#description)
 * [Rezensionen](https://de.wordpress.org/plugins/a-random-number/#reviews)
 *  [Installation](https://de.wordpress.org/plugins/a-random-number/#installation)
 * [Entwicklung](https://de.wordpress.org/plugins/a-random-number/#developers)

 [Support](https://wordpress.org/support/plugin/a-random-number/)

## Beschreibung

A Random Number adds a simple random number generator to WordPress. Add the „A Random
Number“ block in the block editor, or put the `[arandomnumber]` shortcode in any
post, page or widget, and it prints a new random number every time the page loads.
Use it as many times as you like on the same page.

#### Features

 * Gutenberg block with minimum, maximum and thousands-separator settings and a 
   live preview
 * Random number generator shortcode for posts, pages and text widgets
 * Custom range with the `min` and `max` attributes (default 1 to 100)
 * Negative numbers and large ranges are supported
 * Thousands separators on by default, switch them off with `comma=no`
 * Insert button in the classic editor (visual and text mode)
 * No settings page and no database tables to manage

#### How to use

In the block editor click the add-block button, search for „A Random Number“ and
set the range in the block sidebar.

Or add the shortcode wherever you want the number to appear. The default range is
1 to 100.

    ```
    [arandomnumber]
    ```

Pick your own range with `min` and `max`:

    ```
    [arandomnumber min=1 max=10000]
    ```

This prints a number between 1 and 10,000, for example 8,014.

    ```
    [arandomnumber min=-500 max=-1]
    ```

This prints a number between -500 and -1, for example -232.

    ```
    [arandomnumber min=50000000 max=60000000]
    ```

This prints a number between 50,000,000 and 60,000,000, for example 56,449,060.

To print the number without thousands separators use `comma=no`:

    ```
    [arandomnumber min=100000 max=999999 comma=no]
    ```

This prints something like 456245.

#### Use cases

 * Giveaway or contest placeholder numbers
 * Lucky numbers, dice-style demos and games
 * Test data and sample figures while you build a page
 * Random values for form fields or URLs
 * Checking whether a page is cached: the number changes on every uncached page 
   load

## Screenshots

[⌊Random numbers on a page, each shortcode with its own minimum and maximum.⌉⌊Random
numbers on a page, each shortcode with its own minimum and maximum.⌉[

Random numbers on a page, each shortcode with its own minimum and maximum.

[⌊The Random Number block in the block editor, with minimum and maximum in the sidebar(
the [arandomnumber] shortcode works too).⌉⌊The Random Number block in the block 
editor, with minimum and maximum in the sidebar (the [arandomnumber] shortcode works
too).⌉[

The Random Number block in the block editor, with minimum and maximum in the sidebar(
the [arandomnumber] shortcode works too).

## Blöcke

Dieses Plugin bietet 1 Block.

 *   A Random Number Displays a random number between a minimum and a maximum, different
   on every page load.

## Installation

 1. Upload the plugin files to the `/wp-content/plugins/a-random-number` directory,
    or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‚Plugins‘ screen in WordPress
 3. Use the shortcode to display your magic number.

## FAQ

### How do I show a random number between two values?

In the block editor add the „A Random Number“ block and fill in the minimum and 
maximum in the sidebar. With the shortcode use the `min` and `max` attributes, for
example `[arandomnumber min=1 max=50]`. If you enter min and max in the wrong order
the plugin swaps them for you.

### Does the number change on every page load?

Yes. A new number is picked each time WordPress builds the page. If you use a page
cache or a caching plugin, the cached copy of the page keeps the number that was
generated when it was cached, so exclude that page from caching if you need a fresh
value for every visitor.

### Can I remove the thousands separators?

Yes, add `comma=no`, for example `[arandomnumber min=1000 max=9999 comma=no]`.

### Can I use it for lotteries, passwords or security tokens?

No. The plugin uses the WordPress random number function, which is fine for display
purposes, but it is not designed for security-sensitive uses or for draws that must
be provably fair.

### Does it work in widgets and page builders?

It works anywhere WordPress runs shortcodes: posts, pages and text widgets. In page
builders, use a shortcode or text element and paste the shortcode into it.

### Does the plugin store any data about my visitors?

The plugin does not collect personal data about visitors. It keeps one small internal
option in your own database.

## Rezensionen

![](https://secure.gravatar.com/avatar/d989645a057abedee791b91c8183b835f7e99637b2b6aac80dc2b6e8f01e49f3?
s=60&d=retro&r=g)

### 󠀁[too bad.. a no go!](https://wordpress.org/support/topic/too-bad-a-no-go/)󠁿

 [griezo](https://profiles.wordpress.org/griezo/) 18. Februar 2025

To bad… why there is suddenly a link? A no go.Found a better random numer generator(
B7) without all the nonsens.

![](https://secure.gravatar.com/avatar/ef648e46343bdb166cc99907f265fffcd2f1456bc4be87d4ce43c4c0761585c8?
s=60&d=retro&r=g)

### 󠀁[Started to add ad links](https://wordpress.org/support/topic/started-to-add-ad-links/)󠁿

 [weekender](https://profiles.wordpress.org/weekender/) 23. Januar 2025

Suddenly started to post ad links with the random numbers. No go.

![](https://secure.gravatar.com/avatar/b5489faeee2f236878bafdfd1fedd489eb3484bdfbcb59cd8c253136febed8e5?
s=60&d=retro&r=g)

### 󠀁[Works great!](https://wordpress.org/support/topic/works-great-7411/)󠁿

 [dansayswithwords](https://profiles.wordpress.org/dansayswithwords/) 18. Januar
2021

I use it to add a random number to a hidden form field in a form used to invite 
others to register That is then emailed as part of the invitation and entered by
the person when they register to verify them..

![](https://secure.gravatar.com/avatar/a593858f7ad3acae50953468b76e26f98bfd798fa033eb2c40f8fb7659918139?
s=60&d=retro&r=g)

### 󠀁[Useful And Easy To Use](https://wordpress.org/support/topic/useful-and-easy-to-use-21/)󠁿

 [mehdibmm](https://profiles.wordpress.org/mehdibmm/) 21. Mai 2018

This plugin is awesome, it's useful and so easy to use (you just have to insert 
a shortcode anywhere you want and baaaaam).

![](https://secure.gravatar.com/avatar/97914d4a4b7d4b641e33f727d24ea15f5e0a0ecaaca09a5ad8b550b957ae2618?
s=60&d=retro&r=g)

### 󠀁[Works great.](https://wordpress.org/support/topic/works-great-4535/)󠁿

 [JimDixon](https://profiles.wordpress.org/jimdixon/) 14. Dezember 2017

I needed a way to force a link to reload and not use the cached version. This tool
allowed me to insert a random number in the URL.

![](https://secure.gravatar.com/avatar/400c749a1f1d8a1417850f064920b221e67b4b17f7d6f416ba9f49b319ef5dcd?
s=60&d=retro&r=g)

### 󠀁[Works well](https://wordpress.org/support/topic/works-well-708/)󠁿

 [givememyleg](https://profiles.wordpress.org/givememyleg/) 3. September 2016

It does what it says it does. Simple yet works, used it to help me with testing 
page caching.

 [ Alle 6 Rezensionen lesen ](https://wordpress.org/support/plugin/a-random-number/reviews/)

## Mitwirkende und Entwickler

„A Random Number“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin
mitgewirkt:

Mitwirkende

 *   [ Mortgage Calculator ](https://profiles.wordpress.org/mlcalc/)

„A Random Number“ wurde in 1 Sprache übersetzt. Danke an [die Übersetzer](https://translate.wordpress.org/projects/wp-plugins/a-random-number/contributors)
für ihre Mitwirkung.

[Übersetze „A Random Number“ in deine Sprache.](https://translate.wordpress.org/projects/wp-plugins/a-random-number)

### Interessiert an der Entwicklung?

[Durchstöbere den Code](https://plugins.trac.wordpress.org/browser/a-random-number/),
sieh dir das [SVN-Repository](https://plugins.svn.wordpress.org/a-random-number/)
an oder abonniere das [Entwicklungsprotokoll](https://plugins.trac.wordpress.org/log/a-random-number/)
per [RSS](https://plugins.trac.wordpress.org/log/a-random-number/?limit=100&mode=stop_on_copy&format=rss).

## Änderungsprotokoll

#### 1.3.0

 * New: Gutenberg block „A Random Number“ with minimum, maximum and thousands-separator
   settings.
 * Translation-ready: all strings use the a-random-number text domain.
 * A review reminder in the admin after two weeks, dismissible.
 * Requires WordPress 5.8 or newer.

#### 1.2.2

 * Hardening: direct-access guard, prefixed function names, shortcode min/max are
   cast to integers (non-numeric values no longer cause a fatal error on PHP 8),
   output of the stored link data is escaped, editor button accepts only whole numbers,
   WordPress random functions are used.

#### 1.2.1

 * Tested with WordPress 7.1. Outbound credit links now carry rel=“nofollow“.

#### 1.2

 * Updated to the latest WordPress version.

#### 1.1

 * Added comma attribute to remove commas if needed.
 * Released August 19, 2017

#### 1.0

 * Launched A Random Number into the Internets. It’s alive!
 * Released January 8, 2016

## Meta

 *  Version **1.3.0**
 *  Zuletzt aktualisiert **vor 3 Wochen**
 *  Aktive Installationen **700+**
 *  WordPress-Version ** 5.8 oder höher **
 *  Getestet bis **7.1.4**
 *  PHP-Version ** 7.4 oder höher **
 *  Sprachen
 * [English (US)](https://wordpress.org/plugins/a-random-number/) und [Russian](https://ru.wordpress.org/plugins/a-random-number/).
 *  [Übersetze in deine Sprache](https://translate.wordpress.org/projects/wp-plugins/a-random-number)
 * Schlagwörter
 * [gutenberg](https://de.wordpress.org/plugins/tags/gutenberg/)[random](https://de.wordpress.org/plugins/tags/random/)
   [random number](https://de.wordpress.org/plugins/tags/random-number/)[random number generator](https://de.wordpress.org/plugins/tags/random-number-generator/)
   [shortcode](https://de.wordpress.org/plugins/tags/shortcode/)
 *  [Erweiterte Ansicht](https://de.wordpress.org/plugins/a-random-number/advanced/)

## Bewertungen

 3.7 von 5 Sternen.

 *  [  4 5-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/a-random-number/reviews/?filter=5)
 *  [  0 4-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/a-random-number/reviews/?filter=4)
 *  [  0 3-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/a-random-number/reviews/?filter=3)
 *  [  0 2-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/a-random-number/reviews/?filter=2)
 *  [  2 1-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/a-random-number/reviews/?filter=1)

[Deine Rezension](https://wordpress.org/support/plugin/a-random-number/reviews/#new-post)

[Alle Rezensionen anzeigen](https://wordpress.org/support/plugin/a-random-number/reviews/)

## Mitwirkende

 *   [ Mortgage Calculator ](https://profiles.wordpress.org/mlcalc/)

## Support

Behobene Probleme in den letzten zwei Monaten:

     0 von 1

 [Support-Forum anzeigen](https://wordpress.org/support/plugin/a-random-number/)