WordPress.org

Ready to get started?Download WordPress

Plugin Directory

mPress Banners

Easily create slide-up or slide-down banners on your site with a simple shortcode.

FAQ

Can visitors dismiss unwanted ads?

Yes. By default, a visitor can dismiss an ad by clicking the close box in the upper right corner. If you don't want visitors to be able to dismiss ads, then you can disable this using the shortcode.

What is required to make the shortcode work?

The [mpress_banner] shortcode requires only the 'banner' attribute to work properly. All other attributes are optional. The shortcode will only display a banner if the banner id is passed to the 'banner' attribute, like this: [mpress_banner banner="12"]. You can pass in multiple banner ids like this: [mpress_banner banner="12, 14, 21"]. Banners will display in the order that the ids are listed. Banner ids are listed in the admin on the banner listing screen.

Optionally, you can use the shortcode like this if you wish to simply provide your own html markup: [mpress_banner]<a href="{link_url}"><img src="{image_url}" /></a>[/mpress_banner].

If you simply use the [mpress_banner] shortcode with no attributes, then admins will see a help message.

What are the optional settings that allow me to customize my banner ads?

The shortcode provides several optional settings, or attributes, with which you can customize your banner ads:

  • id - Set a custom HTML id for the banner wrapper so you apply custom CSS to specific banners. Example: [mpress_banner banner="1" id="my-banner"]

  • time_delay - Customize the time delay in seconds for your ads. The default is 5 seconds. Example: [mpress_banner banner="1, 2" time_delay="10"]

  • direction - Set the banner to slide up or down. Can be set to 'down'. The default is 'up'. Example: [mpress_banner banner="1" direction="down"]

  • persistent - By setting this attribute to 'true', no animation will be applied and the ad won't disappear after a set time delay. Basically, the ad will behave more like an image inserted into a post. Note: If you pass in multiple banner ids, only the first banner will be displayed since no animations are applied. Example: [mpress_banner banner="1" persistent="true"]

  • loop - Setting this attribute to 'true' will cause the banner(s) to continuously rotate. This feature is turned off by default. Example: [mpress_banner banner="1" loop="true"]

  • dismissible - Set this attribute to 'false' to prevent users from being able to dismiss ads. Example: [mpress_banner banner="1" dismissible="false"]

  • random - Set this attribute to 'true' to shuffle the banner order on each page load. Obviously, you will need to pass in multiple banner ids for this to work. Example: [mpress_banner banner="1, 2, 3, 4, 5" random="true"]

Can I display a banner or set of banners on a sitewide basis?

Yes. Just use this code to insert banners in your theme template files: <?php echo do_shortcode('[mpress_banner banner="1, 2"]'); ?>.

Additionally, you can use a filter such as 'the_content' to append or prepend the shortcode to all of your posts or to a specific set of posts.

Requires: 3.2 or higher
Compatible up to: 3.5.2
Last Updated: 2013-1-31
Downloads: 7,260

Ratings

3 stars
3.3 out of 5 stars

Support

0 of 1 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,2,2
100,1,1
100,2,2