• I want to add the currency selection drop-down after the cart in the Storefront header. Can this be done within Booster, or by writing a a functions.php snippet using the shortcode? (I tried both but couldn’t get anything working.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Storefront theme does not allow adding widgets or text to the header area in its customization settings. You could try using echo do_shortcode( '[wcj_currency_select_drop_down_list]' ); PHP code to add it to your chosen php file and see what happens.

    Thread Starter embmus

    (@embmus)

    This should work, but I don’t think the shortcode is registered by the time this is run. Or there could be another problem entirely.

    //	Put Booster currency dropdown after cart in header
    add_action( 'init' , 'add_currency' , 15 );
    function add_currency() {
            add_action( 'storefront_header', 'insert_currency', 65 );
    }
    function insert_currency() {
    	echo do_shortcode( '[wcj_currency_select_drop_down_list]' ); 
    }

    Is this the right approach, and can you see where the problem is?

    • This reply was modified 6 years, 2 months ago by embmus.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add currency switcher to cart in header?’ is closed to new replies.