Skip to content

WooRewards

  1. Home
  2. Docs
  3. WooRewards
  4. Shortcodes

Shortcodes

This documentation is for the WooRewards plugin

Since Version 2.5, WordPress supports Shortcodes. Shortcodes are unique tags that will execute macros or scripts on your page or post’s content. As such, they’re really powerful and can deeply modify the content of your pages.

A trivial shortcode for a gallery looks like this:

[[gallery]]

Shortcodes can also be used with additional attributes as the following example shows:

[[gallery id="123" size="medium"]]

Both examples will display an image gallery, which would be hard to maintain when writing the HTML markup for it and keeping it in sync with uploaded images. By using a shortcode, the markup for the gallery will be created dynamically and automatically.

How to add a shortcode on your website

First, you need to edit the post or page where you want to add the shortcode. Secondly, you need to add the shortcode to your content. You can find more information in wpbeginner’s guide.

WooRewards Shortcodes

WooRewards provides a wide list of shortcodes you can use to add loyalty related content to your website. You’ll find a list of available shortcodes by going to WooRewards → Appearance → Shortcodes. For each shortcode, you’ll find a detailed explanation on the shortcode, its options and some use examples.

Styling Shortcodes

If you want to customize how the shortcodes look on your website, begin by following this guide. All WooRewards shortcodes have a base class on the first element level you can use to style the shortcode content.

Scroll To Top