Skip to content

Using the Function Call

David Artiss edited this page Nov 12, 2017 · 1 revision

If you wish to perform a currency conversion within your theme, rather than within a post or page, then you can use a PHP function call. The function name is get_conversion and will return the result back.

  • All of the shortcode parameters are valid, except for the template which isn't required
  • The parameters are specified in any order and are separated with an ampersand
  • You should not add quotes around each parameter value, as you do with the shortcode

For example...

<?php echo get_conversion( 'number=49.99&from=gbp&to=usd' ); ?>

Clone this wiki locally