As I reflected on my site redesign, I realized that without a sidebar, there wasn’t an easy way for people to see what was in their cart. Heck, it was hard to see there was even a cart to be had, which meant sales were down a little.
Now there are a lot of ways to fix this, but in essence all I did was add a new menu to the top of the page, between the site header and the post content, which reminded you there were books, there were discounts, and did you know your cart was empty?
The menu part is simple, everyone knows how to make a menu in WordPress. Go to Appearance, Menu, make a new menu. I named mine ‘Cart’ because I’m unimaginative. Then I had to do code. Don’t worry, this is relatively easy.
First up I had to add the cart to the menu. I did that with WP Menu Cart, which is a plugin to add a shopping cart to your menu. It’s free, it works with WooCommerce, WP-Ecommerce, EDD, Eshop and Jigoshop, and it’s a set it and forget it thing. If your theme already has a menu where you want to add the cart, you’re done. If it doesn’t, remember you can add a menu into a widget. If that doesn’t work for you then yes, you do need some code.
wp_nav_menu( array( 'menu' => 'cart' ));
That code tells WordPress “Display the menu ‘cart.'” That’s all the code you need. Now since I use Genesis’ StudioPress themes, I grabbed a second plugin called Genesis Simple Hooks to be able to put that code in ‘before the post content.’ I checked the box to say ‘Execute PHP’ and hit save and I had a menu.
All that was left for me was some CSS styling, and that’s in the eye of the beholder.
Do I think this is necessary for a site? Actually yes. I think that your visitors need a quick and easy way to know they can give you their money. To put it another way, by not showing them they can use a cart, you’ve put up a barrier between them and you. It’s not needed, so I removed it.
For another point of view, now a screenreader will see the cart, as it were, and be able to know they can buy things.