WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've tried and installed loads of free WP plugins that can't do what I would like them to do.

I write a fictional news blog and I'd like to be able to display about a dozen or so adverts that I've made myself. They are each going to be 250x250px and need to be in the sidebar of my site. I figured it would be easier if it was in a widget.

I'm not using a external service like Adsense. It's not necessary that my adverts keep record of impressions and they don't have a hyperlink.

share|improve this question

closed as off-topic by Pieter Goosen, Johannes Pille, birgire, ialocin, Wyck Aug 9 '14 at 16:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

use html inside a text widget – onetrickpony Jun 25 '11 at 21:08
@OneTrickPony: I had thought of that. I'd like to display several different adverts randomly, I don't think PHP works with text widgets. – Ambo100 Jun 25 '11 at 22:12
@OneTrickPony: I've found a simple image rotator script online and it works fine. If your comment was an answer I would accept it. – Ambo100 Jun 25 '11 at 22:21
Maybe you should answer your question with the link to that script? – onetrickpony Jun 25 '11 at 22:23
up vote 1 down vote accepted

Create a new folder in your WP directory called 'Adverts' Upload all your banner images to this folder as well as a PHP image randomising script I had found with a quick Google search. Place a text widget in your sidebar and add a html img tag linking directly to PHP file.

share|improve this answer

This is (sort of shamefully) promoting my own plugin, but you could use my Really Simple Gallery Widget, which can show a specified number of images attached to a post/page in a random order.

So, you would upload your adverts while editing a page or post so that they are attached to it or attach them in the Media Library if they are already uploaded, and then set up the widget accordingly. You can even upload the adverts to an existing page or post that won't have any other media so you don't have an empty entry just for the advert uploads. So long as you don't insert them into the content, they shouldn't show unless your theme does something with attached images.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.