Add Cart Icon in Top Bar

This is a developer-level article. If you’re unfamiliar with PHP and/or editing files, codes and templates, as well as with resolving possible conflict, please seek help from our support for small changes.

Add this code to your child theme functions.php file:

// Add cart icon in top bar
function prefix_add_cart_icon() {
        if ( true === olympus_get_option( 'add_cart_icon' ) ) {
                remove_action( 'olympus_after_navigation', 'olympus_woocommerce_add_cart_icon', 20 );
                add_action( 'olympus_after_topbar_container_inner', 'olympus_woocommerce_add_cart_icon' );
add_action( 'wp', 'prefix_add_cart_icon' );

You can change olympus_after_topbar_container_inner by the hook you want, to add the cart icon at the end of the secondary menu, replace it with olympus_after_second_nav.

All PHP snippets should be added via a child theme’s functions.php file.

Subscribe to our newsletter

Get tips, news, gifts and exclusive promotions directly to your inbox and be the first to know about the latest updates from us. No spam, we guarantee!


Blazingly fast, lightweight, fully responsive, SEO-ready, and 100% Vanilla JS WordPress Theme

Facebook YouTube

Our Products

Get Help


Copyright © 2024 | Created with Olympus & Olympus Blocks