Wordpress: Customizing the WooCommerce My Account Page with Tabs using CSS & HTML
WooCommerce has made creating and managing a WordPress e-commerce store relatively easy. One of the things I like best is the relative ease by which you can customize it to work for your particular needs.
Over the past few months, I’ve found myself increasingly jealous of the My Account page on WooThemes, whereas the My Account page using the theme, Storefront, was pretty lame by comparison.
So I spent a couple hours and added some simple tabs to the My Account page at The Youth Cartel and wanted to pass along how I did it.
Level of difficulty: Low/Medium
Time Needed: 15 minutes, more to perfect the CSS for your site.
Tools Needed: FTP client, HTML editor
Step Zero
Back up your theme.
Step One
The first thing we’re going to do is make sure that these changes are revision proof by storing this customization inside the right place. That way, the next time WooCommerce releases and update you don’t have anything to worry about.
- Copy my-account.php from /wp-contents/plugins/woocommerce/templates/myaccount/my-account.php locally.
- Create the following folders in your theme folder: yourtheme/woocommerce/myaccount/
Note: You shouldn’t be caching this page anyway. But if it’s cached, you might need to clear the cache to see the changes you make above. Actually, save yourself some time and make sure that page isn’t cached…
Step Two
Now that you’ve got a local back-up and a properly configured way to revision proof these customizations, we’ll make the change.
- We’re going to replace most of the content of the original my-account.php with HTML that’ll become our tabs. Here’s my code.
- After that, we’re going to add the CSS for the tabs into your child theme’s style.css file. (Alternately, you could add this to the custom CSS section within theme options. (I prefer the child theme option, but either way works.) Here’s my CSS.
Step Three
Head back to your My Account page and see the changes on your site. Lastly, customize the tabs for your own purposes, add/delete tabs, customize the CSS, etc.
Questions, Problems, or Improvements?
Leave me a comment below and I’ll do my best to help you get it set-up.
Wordpress: Customizing the WooCommerce My Account Page with Tabs using CSS & HTML
Reviewed by Ricardo
on
21:42
Rating:
No hay comentarios: