Most of the themes offer widget area’s in top-bar if that is the case you can simply place the following shortcode in top-bar/header widget area.
In case your theme does not offer a widget area where you want to display cart summary, Or you will need to edit your theme file (usually header.php) and insert one of the following codes in it an appropriate place.
<?php echo do_shortcode("whcom_op_cart_summary"); ?> <?php echo do_shortcode("whcom_op_cart_summary type="button""); ?> <?php echo do_shortcode("whcom_op_cart_summary type="dropdown""); ?>
For sake of example, we are providing an example with most used theme i.e. AVADA
Following are the steps in which we will show you how to embed currency combo in top-bar
- Go to Appearance and click on Editor.
- Open the file named as header.php. Most probably the title of the file will be “Theme Header”.
- Paste one of the following codes into this file at the appropriate place.
<?php echo do_shortcode("whcom_op_cart_summary"); ?> <?php echo do_shortcode("whcom_op_cart_summary type="button""); ?> <?php echo do_shortcode("whcom_op_cart_summary type="dropdown""); ?>
- Click on Update File to save changes.
- Open any page of your website to see how this code worked.
more information on do_shortcode function of WordPress can be found here