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.
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.
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.