Chapter 9. WooCommerce Theming

In this chapter, we will cover:

  • Declaring support for WooCommerce
  • Displaying the accepted credit cards
  • Adding a cart icon to the menu
  • Overriding WooCommerce templates
  • Using WooCommerce hooks
  • Displaying an image on the category archive page
  • Writing CSS to customize the Add to Cart button
  • Creating a product slideshow
  • Removing a product category from the Shop page

Introduction

With hosted e-commerce platforms, you're limited to customizing the areas they let you customize. With a platform such as WooCommerce, which is open source, you can customize just about anything. Many themes have user-friendly controls for the most common customizations and, for the things that you can't change via the admin area, you can change with code. Even if you can't change something with code, there are many developers out there willing to do it.

There are many modifications you can make with plugins that are freely available, for example, displaying the credit cards you accept and adding a cart icon to the menu. And there are plenty of things you can change with code. You can override any of the WooCommerce templates, use the hooks built into WooCommerce to add extra programming, and do plenty of other things.

This chapter will focus on the code in rather more detail. Many users want to make their store reflect their brand and they like to customize every little detail. That's why this chapter will emphasize the code—so that you can customize every detail as you like.

If you haven't yet picked a theme for your e-commerce store, a great starting point is the Storefront theme from WooThemes. It's available for free on WordPress.org; go to https://wordpress.org/themes/storefront/.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset