Title: Random Content Shortcode
Author: Nico
Published: <strong>8. september, 2016</strong>
Last modified: 5. februar, 2018

---

Søg plugins

Dette plugin **er ikke blevet testet med de seneste 3 større udgivelser af WordPress**.
Det vedligeholdes eller understøttes muligvis ikke længere og kan have kompatibilitetsproblemer,
når det bruges med nyere versioner af WordPress.

![](https://s.w.org/plugins/geopattern-icon/random-content-shortcode.svg)

# Random Content Shortcode

 Af [Nico](https://profiles.wordpress.org/nico23/)

[Download](https://downloads.wordpress.org/plugin/random-content-shortcode.zip)

 * [Detaljer](https://da.wordpress.org/plugins/random-content-shortcode/#description)
 * [Vurderinger](https://da.wordpress.org/plugins/random-content-shortcode/#reviews)
 *  [Installation](https://da.wordpress.org/plugins/random-content-shortcode/#installation)
 * [Udvikling](https://da.wordpress.org/plugins/random-content-shortcode/#developers)

 [Support](https://wordpress.org/support/plugin/random-content-shortcode/)

## Beskrivelse

Check out the [plugins page](https://nextgenthemes.com/plugins/random-content-shortcode/)
to see it in action.

Simple Shortcode for displaying random content on your site. Just wrap the shortcode
arround the lines of content you want one to be displayed at random.

The following example will display one of the two videos or one of the two lines
of text, empty lines will ignored.

    ```
    [random_content]

    A line with some text in it.

    [arve url="https://youtu.be/b1rTZJxEnAQ" title="A Video Embedded with ARVE" maxwidth="350"]

    A bold line.

    [arve url="https://vimeo.com/124400795" title="A Video Embedded with ARVE" maxwidth="400"]

    [/random_content]
    ```

By default the newline `\n` character is used to separate content. You can also 
choose another separator, do this if you have problems with the default or like 
to have random content with multiple lines on one piece like this:

    ```
    [random_content separator="|||"]
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

    Aenean commodo ligula eget dolor. Aenean massa.
    |||
    Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

    Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.
    |||
    Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate

    Aenean commodo ligula eget dolor. Aenean massa.
    [/random_content]
    ```

Or have a compact single line like this:

    ```
    [random_content separator="#"]One#Two#Three#Four[/random_content]
    ```

## Installation

Please refer to [codex.wordpress.org/Managing_Plugins#Automatic_Plugin_Installation](https://codex.wordpress.org/Managing_Plugins#Automatic_Plugin_Installation).

## FAQ

  Installation Instructions

Please refer to [codex.wordpress.org/Managing_Plugins#Automatic_Plugin_Installation](https://codex.wordpress.org/Managing_Plugins#Automatic_Plugin_Installation).

## Anmeldelser

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

### 󠀁[2021 and it still work](https://wordpress.org/support/topic/2021-and-it-still-work/)󠁿

 [Volgogradec](https://profiles.wordpress.org/volgogradec/) 2. marts, 2021

Very simple plugin for trivial task.

 [ Læs 1 anmeldelse ](https://wordpress.org/support/plugin/random-content-shortcode/reviews/)

## Bidragsydere & udviklere

“Random Content Shortcode” er open source-software. Følgende personer har bidraget
til dette plugin.

Bidragsydere

 *   [ Nico ](https://profiles.wordpress.org/nico23/)

[Oversæt “Random Content Shortcode” til dit eget sprog.](https://translate.wordpress.org/projects/wp-plugins/random-content-shortcode)

### Interesseret i udvikling?

[Gennemse koden](https://plugins.trac.wordpress.org/browser/random-content-shortcode/),
tjek [SVN repository](https://plugins.svn.wordpress.org/random-content-shortcode/),
eller abonner på [udviklerloggen](https://plugins.trac.wordpress.org/log/random-content-shortcode/)
via [RSS](https://plugins.trac.wordpress.org/log/random-content-shortcode/?limit=100&mode=stop_on_copy&format=rss).

## Ændringslog

### 2018-02-03 – 2.1.0

 * Fixed new version not working in sidebars.

### 2018-02-03 – 2.0.1

 * Namespace fix.

### 2018-02-02 – 2.0.0

 * Fix: Plugin not working correctly. Sometimes displaying nothing …
 * Improved: Added `[random_content]` shortcode because I read that dashes work 
   but are not recommended. `[random-content]` still works for backwards compatibility
   but you should use `[random_content]`.
 * Improved: Rewritten the the JavaScript and some PHP code. Removed jQuery dependancy.
 * Improved: Loads script early and dequeue it in case its not needed.

### 2016-11-07 – 1.3.3

 * Fix php error on admin screen.

### 2016-11-05 – 1.3.1

 * Fix spelling error the `seperator` attribute is now `separator`.
 * Fix plugin sometimes showing nothing.

### 1.2.1 – 2016-09-09

 * Fix plugin not working correctly.

### 1.1.0 – 2016-09-08

 * Rewrite some php and addind Javascript to make it work with chaching.

### 1.0.0 – 2016-09-07

 * Release

## Meta

 *  Version **2.1.0**
 *  Senest opdateret **8 år siden**
 *  Aktive installationer **80+**
 *  WordPress-version ** 4.5.0 eller højere **
 *  Testet op til **5.0.0**
 *  PHP-version ** 5.6 eller højere **
 *  Sprog
 * [English (US)](https://wordpress.org/plugins/random-content-shortcode/)
 * Tags
 * [random](https://da.wordpress.org/plugins/tags/random/)[random content](https://da.wordpress.org/plugins/tags/random-content/)
   [shortcode](https://da.wordpress.org/plugins/tags/shortcode/)
 *  [Avanceret visning](https://da.wordpress.org/plugins/random-content-shortcode/advanced/)

## Bedømmelser

 5 ud af 5 stjerner.

 *  [  1 5-stjernet anmeldelse     ](https://wordpress.org/support/plugin/random-content-shortcode/reviews/?filter=5)
 *  [  0 4-stjernet anmeldelser     ](https://wordpress.org/support/plugin/random-content-shortcode/reviews/?filter=4)
 *  [  0 3-stjernet anmeldelser     ](https://wordpress.org/support/plugin/random-content-shortcode/reviews/?filter=3)
 *  [  0 2-stjernet anmeldelser     ](https://wordpress.org/support/plugin/random-content-shortcode/reviews/?filter=2)
 *  [  0 1-stjernet anmeldelser     ](https://wordpress.org/support/plugin/random-content-shortcode/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/random-content-shortcode/reviews/#new-post)

[Se alle anmeldelser.](https://wordpress.org/support/plugin/random-content-shortcode/reviews/)

## Bidragsydere

 *   [ Nico ](https://profiles.wordpress.org/nico23/)

## Support

Har du noget at sige? Har du brug for hjælp?

 [Vis supportforum](https://wordpress.org/support/plugin/random-content-shortcode/)

## Donér

Vil du gerne støtte udviklingen af dette plugin?

 [ Donér til dette plugin ](https://nextgenthemes.com/donate/)