Title: Random Related Posts Based on Category
Author: James Kemp
Published: <strong>21. december, 2010</strong>
Last modified: 10. januar, 2011

---

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-related-posts-based-on-category.
svg)

# Random Related Posts Based on Category

 Af [James Kemp](https://profiles.wordpress.org/tristarweb/)

[Download](https://downloads.wordpress.org/plugin/random-related-posts-based-on-category.zip)

 * [Detaljer](https://da.wordpress.org/plugins/random-related-posts-based-on-category/#description)
 * [Vurderinger](https://da.wordpress.org/plugins/random-related-posts-based-on-category/#reviews)
 *  [Installation](https://da.wordpress.org/plugins/random-related-posts-based-on-category/#installation)
 * [Udvikling](https://da.wordpress.org/plugins/random-related-posts-based-on-category/#developers)

 [Support](https://wordpress.org/support/plugin/random-related-posts-based-on-category/)

## Beskrivelse

This plugin allows you to list any number of related posts from the same category
as the current post. You can also randomise these results. It is very lightweight,
at only 3KB.

There are a number of options available:

 * Choose the number of Posts to show
 * Choose whether it displays these posts randomly, or in order specified by you.
 * Choose whether to display a title, what tags to use, and what text should be 
   displayed (e.g. H3)
 * Choose a class for the main UL

To display the random related posts in its simplest form, simply place the following
code in your single.php file – `<?php relatedPosts(); ?>`.

To edit the options availble, use the following codes:

    ```
    <?php relatedPosts(
        $ppp = 4, 
        $rand = true, 
        $rPinctitle = true, 
        $rPtitletag = 'h3', 
        $rPtitle = 'Related Posts', 
        $rPulclass = 'related_posts',
        $orderby = 'title', 
        $order = 'ASC'
    ); ?>
    ```

Where:

 * **$ppp** = Number of posts to display (Any integer allowed)
 * **$rand** = sets the display to random (true/false)
 * **$rPinctitle** = Displays the title (true/false)
 * **$rPtitletag** = The type of tag to wrap the title in (Default h3, but it can
   be any valid HTML tag)
 * **$rPtitle** = The title to be displayed (This can be any text value)
 * **$rPulclass** = This sets the class of the ul (This can be any text value)
 * **$rPexcerpt** = Displays the post excerpt (true/false)
 * **$orderby** = This allows you to order the posts by certain parameters (title/
   author/date/modified/menu_order/parent/ID/none/comment_count) **If you want to
   choose the order of your posts, be sure to set $rand to false**
 * **$order** = This can either be Ascending or Descending (ASC/DESC)

## Installation

 1. Upload the `random_related_posts_by_cat` directory to the `/wp-content/plugins/`
    directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Place `<?php relatedPosts(); ?>` in your templates – please see the description
    for more options.

## Anmeldelser

Der er ingen anmeldelser for denne widget.

## Bidragsydere & udviklere

“Random Related Posts Based on Category” er open source-software. Følgende personer
har bidraget til dette plugin.

Bidragsydere

 *   [ James Kemp ](https://profiles.wordpress.org/tristarweb/)

[Oversæt “Random Related Posts Based on Category” til dit eget sprog.](https://translate.wordpress.org/projects/wp-plugins/random-related-posts-based-on-category)

### Interesseret i udvikling?

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

## Ændringslog

#### 1.0.2

 * Added ability to choose the order that the related posts are displayed in.

#### 1.0.1

 * Added ability to choose whether to display the excerpt.

#### 1.0

 * First Release

## Meta

 *  Version **1.0.2**
 *  Senest opdateret **15 år siden**
 *  Aktive installationer **10+**
 *  WordPress-version ** 3 eller højere **
 *  Testet op til **3**
 *  Sprog
 * [English (US)](https://wordpress.org/plugins/random-related-posts-based-on-category/)
 * Tags
 * [category](https://da.wordpress.org/plugins/tags/category/)[posts](https://da.wordpress.org/plugins/tags/posts/)
   [random](https://da.wordpress.org/plugins/tags/random/)[related](https://da.wordpress.org/plugins/tags/related/)
 *  [Avanceret visning](https://da.wordpress.org/plugins/random-related-posts-based-on-category/advanced/)

## Bedømmelser

Der er endnu ikke indsendt nogen anmeldelser.

[Your review](https://wordpress.org/support/plugin/random-related-posts-based-on-category/reviews/#new-post)

[Se alle anmeldelser.](https://wordpress.org/support/plugin/random-related-posts-based-on-category/reviews/)

## Bidragsydere

 *   [ James Kemp ](https://profiles.wordpress.org/tristarweb/)

## Support

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

 [Vis supportforum](https://wordpress.org/support/plugin/random-related-posts-based-on-category/)

## Donér

Vil du gerne støtte udviklingen af dette plugin?

 [ Donér til dette plugin ](http://www.tristarwebdesign.co.uk)