# Random background image in wordpress

**URL:** <https://forum.kirupa.com/t/random-background-image-in-wordpress/289481>\
**Category:** Uncategorized\
**Created:** [May 31, 2009, 10:56am UTC](https://forum.kirupa.com/t/random-background-image-in-wordpress/289481 "2009-05-31T10:56:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![www\_agones\_eu](https://avatars.discourse-cdn.com/v4/letter/w/41988e/32.png) [@www\_agones\_eu](https://forum.kirupa.com/u/www_agones_eu)\
**Post date:** [May 31, 2009, 10:56am UTC](https://forum.kirupa.com/t/random-background-image-in-wordpress/289481/1 "2009-05-31T10:56:59Z")

</div>

Hello everybody,

I just recently opened a wordpress blog (www.agones.eu) and I’m totally new to CSS, that’s why i’m here to ask for your help. I want that the background of my blog would change randomly now and then, but I don’t know ho to do it. I found the plugin:

[http://www.district30.net/random-image-widget](http://www.district30.net/random-image-widget)

and it says I should use a function called echo\_random\_image(); but I don’t know hot to use it.

I think I should insert it in my style.css file?

here’s the background part:

```auto

/*++++++++++++++++++ The BACKGROUND IMAGE +++++++++++++++++++++*/

/*+++++ replace "(images/default.jpg)" with another image from the /images directory of the theme or use the custom background switcher (Appearance - Change Background Image) ++++*/

body {

        background: url(images/hill.jpg) no-repeat 0 0 #fff;

        background-attachment:fixed;

        background-position: bottom center;

        color: #000;

        font-family: Arial, Verdana, sans-serif;

        margin: 0;

        padding: 0;

}

cite {

        font-size: 90%;

        font-style: normal;

}

h1 {    

		font-size:20px;

}

h2 {

        

		font-size:18px;

}

h3 {

		font-size:16px;

}

h4 {

		font-size:15px;

}

h5 {

		font-size:14px;

}

h6 {

		font-size:13px;

}

p, li {

        font: 13px 'Arial', Verdana, sans-serif;

        line-height:17px;

}

```

how should I modify it?

thank you very much.
