Archived topic
Display cart
3 replies · Started by Daniele on August 12, 2020
Hi guys,
can you please tell me how to output the Woocommerce cart in a template I'm building?
I found this but I think I'm missing something <?php echo generatepress_wc_cart_link(); ?>
thanks
Hi there,
Would this be within your content?
WooCommerce itself has a cart widget you can call with PHP: <?php the_widget( 'WC_Widget_Cart', 'title=' ); ?>
Hi Tom, it worked with <?php echo generatepress_wc_cart_link(); ?>
I had to add this to style it:
a.cart-contents:not(.has-svg-icon).shopping-bag:before, .secondary-navigation a.cart-contents:not(.has-svg-icon).shopping-bag:before {
content: "\f290";
display: inline-block;
font-family: "GP Premium";
speak: none;
font-style: normal;
font-weight: 400;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
Glad you got it working :)