|
/ Documentation /Custom Code Snippets/ How to change the Empty Cart Heading in Slide Cart?

How to change the Empty Cart Heading in Slide Cart?

By default, Astra displays the “You might like this” heading in the Slide Cart when the cart is empty, and the Show Featured Product option is enabled. This encourages users to browse and explore products even when their cart is empty.

Image

You can easily customize this heading to better match your store’s tone or messaging. Astra provides a filter that allows you to change the default text displayed in the empty Slide Cart. Simply add the following snippet to your site, and replace the text with your preferred message:

add_filter( 'astra_cart_empty_featured_product_heading', function() {
      return 'Nothing here yet — browse our store!';
  } );
Image

Note:

The Modern Cart layout and Cart Upsells should be enabled for the above snippet to work.

If you don’t have your Child Theme installed, please check this article on how to do it. And, if you are not sure how to add this code, please check this article.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page
Image
Want Faster Support?
Priority support within 2 hours
Best engineers to address you
Exclusive discounts on other products
Scroll to Top