Currency Switcher 2.6.x and later

From version 2.6 onward, in addition to original method of displaying the widget in a sidebar, it's finally possible to display it in any page, by simply calling the shortcode, as in the example below:


[aelia_currency_selector_widget title="Widget title (optional)" widget_type="dropdown|buttons"]


The shortcode accepts the following parameters:

  • title
    The widget title (optional)
  • widget_type
    The widget type. The Currency Switcher supports either dropdown or buttons. Further types can be added by implementing a filter in your theme for wc_aelia_cs_currency_selector_widget_types hook. If this parameter is not specified, dropdown widget type will be rendered by default.


If you would like to call the shortcode from your template's code, you can use WordPress' do_shortcode() function. Please refer to the WordPress Codex for the instructions on how to do it: Function Reference/do shortcode/


Currency Switcher 2.5.x and earlier

The Currency Selector widget can be dragged and dropped like any standard WordPress widget. The easiest and most reliable solution to place the widget in an area of your theme is to add a "widgetised area" in such location. To do so, please follow the instructions below:

  1. Register a new widget area by opening /wp-content/themes//functions.php file and adding the following code:


    function my_widget_area_init() {
    register_sidebar( array(
    'name' => 'My widget area',
    'id' => 'my_widget_area',
    'before_widget' => '<div class="widget widget_wc_aelia_currencyswitcher_widget">',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="rounded">',
    'after_title' => '</h2>',
    ) );
    }

    add_action( 'widgets_init', 'my_widget_area_init' );
  2. Go to the Wordpress Admin Panel > Appearance > Widgets. The widget area you just added should now be visible on the right. Drag and drop the Currency Selector in the new widget area,
  3. Open the theme file that displays the page section where you would like to display the new widget area (for example, let's suppose /wp-content/themes/header.php for the header) and add the following code in the exact place where you would like the area to appear:


     <?php if (dynamic_sidebar('my_widget_area') ) : else : endif; ?>

    Save the file and refresh the page. Now the Currency Selector will be displayed in the area you just added.


You can purchase the Currency Switcher on our online shop.