-
Notifications
You must be signed in to change notification settings - Fork 2
/
readme.txt
68 lines (43 loc) · 2.51 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
=== Random Images ===
Contributors: designsimply
Tags: images, random images, shortcode
Requires at least: 2.8
Tested up to: 3.6
Stable tag: 0.7.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
The [random_images] shortcode displays random attached images.
== Description ==
The `[random_images]` shortcode will display a simple set of random images.
It was originally designed to be used by theme developers, so the styling is very simple. It was also released as a shortcode so people could use it in content areas if they'd like. You can enable your theme to display the `[random_images]` shortcode in a text widget by adding a snippet of code to the `functions.php` file in your theme or child theme. See the [FAQ](http://wordpress.org/plugins/random-images/faq/ "Random Images FAQ") for more info.
It uses any attached image in the blog for the source images.
Using `[random_images]` will display 6 images at thumbnail size linked to attachment pages by default.
To change the number of images and the size:
`[random_images total=4 size=medium]`
To make the links point to image files instead of attachment pages:
`[random_images link=file]`
If you have any questions, please ask in the [support forum](http://wordpress.org/support/plugin/random-images "Random Images Support Forum").
== Installation ==
1. Download archive and unzip in wp-content/plugins or install via Plugins - Add New.
1. Start using the `[random_images]` shortcode in your content.
== Frequently Asked Questions ==
= How can I use the random_images shortcode text widgets? =
To enable the random_images shortcode in text widgets, add this to the `functions.php` file in your theme or child theme.
`/**
* If the Random Images plugin is active, allow the random_images shortcode to work in text widgets
**/
if ( method_exists( 'Random_Images_Plugin', 'random_images' ) )
add_filter('widget_text', 'Random_Images_Plugin::random_images');`
= How can I use random images in a WordPress theme? =
This example will display a set of random images from a theme file:
`if ( method_exists( 'Random_Images_Plugin', 'random_images' ) )
echo Random_Images_Plugin::random_images( array( 'size' => 'thumbnail', 'total' => 9 ) );`
== Screenshots ==
1. Set of eight random thumbnail images.
== Changelog ==
= 0.7.1 =
* Switch to using the class as a namespace so it can be called directly in theme files.
* Update code example in readme.txt, move to FAQ.
* Add an option to link directly to files instead of attachment pages.
= 0.7 =
* First version