Currency switcher shortcode

Use the shortcode to show the currency switcher on any page, post, widget area or template that accepts shortcodes.

Plugin Free and Pro
Shortcode [psm-multi-currency-switcher]

Basic use

Add this shortcode where you want the switcher to appear:

Shortcode
[psm-multi-currency-switcher]

With no options, the switcher uses your settings from the Display tab (size, flag, name, symbol and code). See Display Settings.

Options

Option
What it does
Values
size
The size of the switcher.
small or medium. The default is medium.
flag
Show the country flag.
1 to show
name
Show the currency name.
1 to show
symbol
Show the currency symbol.
1 to show
code
Show the 3-letter currency code.
1 to show
Example
[psm-multi-currency-switcher size="small" flag="1" code="1"]
When you use options, leave out what you do not want

As soon as you add any option to the shortcode, the Display tab settings are ignored. Flag, name, symbol and code are shown only if you write them with a value. To hide one, do not write it at all. Do not write flag="false" or flag="no", because any text except 0 or an empty value counts as “show”.

Use at least one of flag, name, symbol and code

If none of them is shown, the shortcode shows nothing.

The easy way: copy from the Display tab

  1. Go to PSM Plugins → Multi Currency → Display.
  2. Change the size and the Show options. The preview updates.
  3. Copy the shortcode shown in the preview box.
  4. Paste it into your page.

Use the shortcode in a theme file

To show the switcher in a theme template, for example in the header, use do_shortcode:

PHP

Troubleshooting

Problem
What to do
I see the shortcode text on my page
Make sure you put it in a Shortcode block, or in a text area that supports shortcodes.
Nothing is shown
Make sure at least one of flag, name, symbol or code has the value 1. Also check that you added more than one currency.
The switcher shows in the wrong currency after I change it
If you use a caching plugin, turn on Use cache plugin. See Cache plugin mode.

What are your feelings

  • Happy
  • Normal
  • Sad